FlightGraph

tcmts.cli.flight.FlightGraph · #7pkjbxck · type

A codebase's server code, as useFlight loads it: what its server components send by reference, and its modules' members

export interface FlightGraph {
  /** the cache */
  dir: string;
  isRef(hash: string): boolean;
  /** a server function server components give the browser (`serverRefs`): Flight sends it as a server reference */
  isServerRef(hash: string): boolean;
  /** the chunks a module (by its component's hash) loads with `import()`, as paths under `/_app/` */
  chunks(componentHash: string): string[];
  /** the packages' browser components a module (by its component's hash) renders, by `packageRefKey` */
  packageImports(componentHash: string): string[];
  members(componentHash: string): string[];
  server: string;
}

used by