/** * D114 0.29.0 LC-D1: `publicConfig(Type)` proved against the manifest that * feeds it. * * A `velar/config` value is a *build input* — the same run reads `velar.json` * and compiles the module, and web-api says the value is "baked into the * content-hashed application entry at build time" — so a manifest that does not * satisfy the declared type is provable before anything runs. It used to be * provable nowhere: `check` and `build` were both silent, and the failure then * arrived during module evaluation, ahead of `velar/app`'s error chain, so not * even the compiler-owned fatal state could render. What the author got was a * blank page and one uncaught host error. * * Runtime validation stays: a manifest a build baked in can be hand-edited * afterwards. This only moves the answer to where the mistake is. * * D115 §三: its own module under `web/analysis/`, because the walk is a * question about a JSON value and a type and needs nothing else from the * analyzer than those two. */ import { type Diagnostic } from "@velarscript/compiler"; import { type Expression, type Program, type ValueType } from "@velarscript/compiler/extension"; /** What the walk asks of the analyzer that hosts it, and nothing more. */ export interface PublicConfigTypeHost { expandAliases(type: ValueType): ValueType; fieldsOf(identity: string): ReadonlyMap | null; describeType(type: ValueType): string; } /** Local names bound to `publicConfig` from `velar/config`, including aliased imports. */ export declare function collectPublicConfigNames(program: Program): ReadonlySet; /** * The manifest's `web.publicConfig`, or null when this compile read no project * manifest. Null is not "empty": an empty section is a claim the compile may * check, and no manifest is no claim at all. */ export declare function declaredPublicConfig(webProject: unknown): Readonly> | null; /** * The VEL5080 one `publicConfig(Type)` call earns, or null when this call makes * no build-time claim or the manifest satisfies the type it names. */ export declare function publicConfigDiagnostic(expression: Extract, declared: ValueType, names: ReadonlySet, manifest: Readonly> | null, host: PublicConfigTypeHost): Diagnostic | null; //# sourceMappingURL=public-config.d.ts.map