MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / enqueue

Function enqueue

src/resolution/frameworks/react.ts:2022–2028  ·  view source on GitHub ↗
(table: { file: string; at: number } | null, prefix: string[], from: string, layouts: string[])

Source from the content-addressed store, hash-verified

2020 // route's `layout:` reference is resolved in the route's own file, so they
2021 // go along only when that place is in the table's file.
2022 const enqueue = (table: { file: string; at: number } | null, prefix: string[], from: string, layouts: string[]): void => {
2023 if (!table || queued.size >= MAX_TABLES) return;
2024 const key = `${table.file}\0${table.at}\0${prefix.join('\0')}`;
2025 if (queued.has(key)) return;
2026 queued.add(key);
2027 queue.push({ ...table, prefix, layouts: table.file === from ? layouts : [] });
2028 };
2029 for (const file of [...consumers].sort()) {
2030 const source = context.readFile(file);
2031 // Most of the files that import React Router only link or navigate.

Callers 1

tableRoutesFunction · 0.85

Calls 4

hasMethod · 0.80
pushMethod · 0.80
joinMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected