export interface SourceTypeGuidance { readonly message: string; readonly replacement: string | null; readonly title: string | null; /** * RE-C3 / RE-U1 (D114 item 9): what to write instead, for a guided spelling * whose successor is a shape rather than a single name. `Array` names `List`, * so a rewrite carries it; `object` names "a record type you declare", which * no rewrite can guess. Both kinds are guided spellings all the same — every * type position refuses them — so both refuse a declaration spelled with * them, and this clause is what such a refusal offers in place of a name. */ readonly declarationAdvice: string | null; } export type CollectionKind = "List" | "Set" | "Map"; export interface CollectionMemberGuidance { readonly message: string; readonly replacement: string | null; readonly title: string | null; } /** The successor sentence for a JavaScript static written on a permanent namespace, when there is one. */ export declare function permanentNamespaceReflectionGuidance(namespace: string, member: string): string | null; /** * RE-I5 / RE-C1: `any` is not one of the Core types charter §5 lists, so every * declaring position refuses it with the sentence every annotation position * already gives — the word names no type, and `unknown` is what an unchecked * boundary value is annotated with. The roster sentence ("every use of it * resolves to the built-in") asserted a built-in that does not exist. */ export declare function refusedAnyDeclarationMessage(position: string): string; /** * RE-C3 / RE-U1 (D114 item 9): the roster sentence a declaring position gives a * guided spelling whose successor is a shape rather than a name, or `null` when * the spelling is not one of those. * * Charter §5's criterion is that a declaration "would declare a name no * annotation can reach". `object`, `Object` and `Callable` met it and were * accepted anyway: `class object:` compiled and ran, and every `x: object` * after it was refused — the exact "declaration writable, every use refused" * shape the 0.29.0 rule exists to remove. The sentence states the rule and * carries the guidance's own replacement, because a refusal that names no * successor is the report `Object` used to earn. */ export declare function refusedGuidedDeclarationMessage(name: string, position: string): string | null; /** * CO-I1: the one sentence both duplicate-import reports say. * * `import {title}` twice, and `import {title}` beside `import {title as * other}`, are the same mistake seen from two positions — one export arriving * twice — so they cannot give two different answers, and the answer the older * of the two gave ("alias one of the imports") is the spelling 0.30.0's own * rule then refuses. Deleting one import is the whole fix; an author who really * wants a second name for the value writes an ordinary binding, which is not an * import at all and collides with nothing. */ export declare function duplicateImportMessage(imported: string, source: string, first: string): string; /** * CO-I1: the alias advice, spelling the *export* the colliding import binds. * * `import {alpha as shared}` beside `import {beta as shared}` is the one * collision 0.31.0 kept an alias for — two different exports wanting one local * name — and the sentence it earned spelled the local: `import {shared as * other}`. Following that answered `Module './lib.vel' has no export named * 'shared'`, because the local is the half that is already wrong. `other` is * the placeholder local, the same one `duplicateImportMessage` writes; where * the export is itself named `other` the placeholder moves, or the advice would * read as a rename to the name it already has. */ export declare function duplicateImportAliasAdvice(name: string, source: string, exported: string, collides: "import" | "declaration"): string; export declare function markGuidedTypeName(node: object): void; export declare function isGuidedTypeName(node: object): boolean; export declare function markRetiredFunctionAnnotation(node: object): void; export declare function isRetiredFunctionAnnotation(node: object): boolean; /** The retired-shorthand sentence: the arrow when it is known, the shape when it is not. */ export declare function retiredFunctionShorthandMessage(written: "Function" | "Function<...>", spelling: string | null): string; /** * CO-I5: the validation ritual, written so it can be pasted back. * * `'Type.parse'` was the toolchain's most repeated remedy and it is not a * spelling: `Type` is a builtin *type* name, legal in an annotation * (`const t: Type = User`) and bound to no value, so `Type.parse(raw)` * answers `Unknown name 'Type'`. Where the refusal already names the type the * author declared, the sentence uses that name and the author's own spelling * of the value, and compiles verbatim. Where nothing at the site names one — * a call on an undeclared foreign value, an `await` on one — the placeholder * is written as a placeholder, so that it reads as a blank to fill rather than * as an identifier to copy. */ export declare function validationRitual(typeName: string | null, valueText: string | null): string; export interface DeclarationKeywordGuidance { readonly message: string; readonly keyword: "def" | "type"; } export declare function webNumericUnitOwner(suffix: string): string | null; export declare function declarationKeywordGuidance(name: string): DeclarationKeywordGuidance | null; export declare function stringMemberGuidance(name: string): string | null; export declare function removedStandardFunctionGuidance(source: string, name: string): string | null; export declare function removedGlobalFunctionGuidance(name: string): string | null; /** * D65 rule 170: one sentence, two stages. A rest parameter without an element * type is refused by the parser in every declaration, and by the analyzer in * an arrow, where the contextual function type gets its chance to supply one * first — exactly as a fixed parameter's type already arrives. Both stages say * the same thing because it is the same refusal. */ export declare const REST_PARAMETER_ELEMENT_TYPE_MESSAGE = "A rest parameter requires an element type"; export declare function sourceTypeNameGuidance(name: string): SourceTypeGuidance | null; export declare function collectionMemberGuidance(kind: CollectionKind, member: string): CollectionMemberGuidance | null; /** * CO-I2: the four Core collection names written where a value belongs. * * `List.repeat(...)`, `Map.get(...)`, `Set.add(...)` and `Record.keys(...)` are * one mistake — a collection type name used as if it carried the operations — * and they used to earn three different answers: `List` the sentence below, * `Map` and `Set` a boundary-validation lecture about declaring `type Map:` * (a declaration the very next `velar check` refuses, because the name is * built in), and `Record` a bare "Unknown name". Each sentence names how a * value of that family is built and where its operations live, and ends on the * same clause, because the reason is the same for all four. */ export declare const coreCollectionConstructorGuidance: readonly (readonly [string, string])[]; /** The one sentence a Core collection type name earns where a value belongs. */ export declare function coreCollectionConstructorMessage(name: string): string | null; /** * D90 (coherence): the one report an unresolved global name earns, by name. * * D115 §三: this table is language guidance, so it lives with the rest of it * rather than in the analyzer's composition root; the analyzer copies it into * the map an extension may add to. */ export declare const coreGlobalGuidance: Map; //# sourceMappingURL=language-guidance.d.ts.map