All files / TRANSPILE/3-Render/headers/types IHeaderEmissionFacts.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40                                                                               
import IHeaderSymbol from "./IHeaderSymbol";
import IHeaderOptions from "../../codegen/types/IHeaderOptions";
import IHeaderTypeInput from "../generators/IHeaderTypeInput";
import TPassByValueParams from "./TPassByValueParams";
 
/**
 * The fully-resolved input to one file's header render call
 * (`HeaderGenerator.generate()`), captured at the warm per-file moment
 * (Stage 5) so the render itself can run afterward, once every file has been
 * transpiled, without reading `CodeGenState` at all.
 *
 * #1323: `generateHeaderForFile` used to both DECIDE this content and RENDER
 * it inline, in the same per-file moment. This is the decision, frozen; the
 * render that consumes it (`HeaderRenderer`) never touches
 * `CodeGenState`, which is what makes issue #1139's failure mode structurally
 * impossible rather than merely fixed -- there is no live per-file state left
 * for a later call to read stale, because nothing here is read live.
 *
 * Every field is resolved from state that is either run-wide (`symbolTable`,
 * `outputExtensions`) or this file's own already-written entry in a
 * path-keyed accumulator the orchestrator holds -- never from a `CodeGenState`
 * field that `reset()` clears before the next file. `needsIsr`,
 * `generatedStructInits`, callback typedef resolution and ADR-006 auto-const
 * are exactly those `CodeGenState` fields, which is why they are captured
 * here as already-resolved values (`options`, `typeInput.callbackTypes`)
 * rather than left for a later reader to re-derive from state that no longer
 * describes this file.
 */
interface IHeaderEmissionFacts {
  readonly symbols: readonly IHeaderSymbol[];
  readonly filename: string;
  readonly options: IHeaderOptions;
  readonly typeInput: IHeaderTypeInput;
  readonly passByValueParams: TPassByValueParams;
  readonly allKnownEnums: ReadonlySet<string>;
  readonly basename: string;
}
 
export default IHeaderEmissionFacts;