/** * What a component's refusals say — the JSX element a call was reaching for, * the contract a `ref` needs, and the four "how many of this section" rules a * body earns once its statements are read. * * D115 §三: these are sentence-building questions about a component's shape, * and none of them needs the analyzer's walk state, so they read as free * functions in their own module rather than as methods in the middle of it. */ import { type Diagnostic, type Span } from "@velarscript/compiler"; import { type Expression, type ValueType } from "@velarscript/compiler/extension"; import { type WebComponentType } from "../types.ts"; /** * D114 0.29.0 JX-I1: calling a component is one mistake, and a named argument * is how it is spelled rather than a second one. The named form therefore * extends the same sentence with the element the author meant — and only that * sentence, so `Card("a")` and `Card(title="a")` each report once. */ export declare function componentCallRefusal(name: string | null, arguments_: readonly Expression[], argumentNames: readonly (string | null)[] | undefined, sourceText: string): string; /** * D114 0.29.0 LC-I2: two different mistakes used to share one sentence. A * component declared without `exposes` really does expose no Handle. A * one-argument `Component` contract is a different failure: the * constructor behind it may expose a Handle exactly as its author intended, and * what withholds `ref` is the contract's missing second type argument (§14). So * the contract is answered with the contract it needs, spelling the Handle the * ref binding already declares when it declares one. */ export declare function componentRefHandleRefusal(tag: string, component: WebComponentType, stored: ValueType): string; export interface ComponentSectionCounts { readonly renders: number; readonly mounted: number; readonly cleanup: number; readonly exposes: number; } /** * D114 0.29.0 JX-I2: VEL5008 names the two ways out, because it is the only * message this shape earns now — a `return` inside a `match` arm or an `if` is * where the count usually goes wrong, and the author who reads "exactly one" * has branches already written that he needs told what to do with. */ export declare function componentSectionCountDiagnostics(name: string, counts: ComponentSectionCounts, declarationSpan: Span, handleTypeSpan: Span | null): readonly Diagnostic[]; /** * D114 0.29.0 ST-D1: a `resource` publishes four reactive fields, and the * surface carrying them is not one of them — the handle is built once and never * replaced, so `watch profile:` compiled clean and never ran. The sentence * VEL5064 already had names the answer ("or a resource field"); what was * missing was this shape's place in the criterion, so the fields are spelled * out here. */ export declare function watchedResourceSurfaceRefusal(name: string): string; //# sourceMappingURL=component-guidance.d.ts.map