SiteResult

tcmts.core.canonicalize.SiteResult · #2yq2a332 · type

import type { RawSpan } from "#codebase/tcmts/core/canonicalize";
import type { IR } from "#codebase/tcmts/core/hash";

export interface SiteResult {
  /** IR with intra-file definition references left as `["@def", id]` placeholders */
  ir: IR;
  spans: RawSpan[];
  reserved: Set<string>;
  /** referenced same-file definitions → whether any reference is evaluated at module init */
  edges: Map<number, boolean>;
  /** uses syntax Node's type stripping can't run (enum, namespace, parameter properties) */
  transform: boolean;
  /** the globals (and unresolved names) it uses: a module-level name must never shadow these */
  globals: Set<string>;
  /** top-level `let`s it assigns to: it must share their module, since an imported binding is read-only */
  writes: Set<number>;
  /** uses JSX: the runtime its elements compile to (`npm:react@19.3.1`), pinned like an import */
  jsx?: string;
}

uses

used by