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

Function enqueue

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

Source from the content-addressed store, hash-verified

1998 // route's `layout:` reference is resolved in the route's own file, so they
1999 // go along only when that place is in the table's file.
2000 const enqueue = (table: { file: string; at: number } | null, prefix: string[], from: string, layouts: string[]): void => {
2001 if (!table || queued.size >= MAX_TABLES) return;
2002 const key = `${table.file}\0${table.at}\0${prefix.join('\0')}`;
2003 if (queued.has(key)) return;
2004 queued.add(key);
2005 queue.push({ ...table, prefix, layouts: table.file === from ? layouts : [] });
2006 };
2007 for (const file of [...consumers].sort()) {
2008 const source = context.readFile(file);
2009 // 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