/** * The permanent Core vocabulary: the types the language publishes under names * no module has to import. * * D114 R1b: these were module constants in `analyzer.ts`, read from three * clusters at once. A constant that names a language-owned type is not * inference state, so it lives where its name says it does and every cluster * imports the one definition. */ import { type FormReadField } from "../contracts.ts"; import { type CoreVocabularyName, type PermanentNamespaceName } from "../core-vocabulary.ts"; import { type DiagnosticFix } from "../diagnostic.ts"; import { type Span } from "../source.ts"; import { type EnumInfo, type TypeParameterBound, type ValueType } from "../types.ts"; export declare const durationType: ValueType; /** * D41 item 61: the one sentence each type-parameter bound is explained with, * wherever it is refused — at a call, at a construction, at a generic * application in a type position, or against a contract that solves it. * * D114: it was defined in `./calls/generic-calls.ts` and read from three * clusters, which made `declarations` import `calls` to print a sentence. The * bound vocabulary is closed and language-owned, so the table belongs with the * rest of the vocabulary and every refusal site reads the one definition. */ export declare const boundVocabularyGuidance: Readonly>; export declare const TEXT_NAMESPACE_MEMBERS: readonly string[]; export declare const MATH_NAMESPACE_MEMBERS: readonly string[]; /** * D57 rule 135: the Core vocabulary's types, keyed by the roster itself. The * `Record` annotation is the pin — a namespace * or prelude name added to `core-vocabulary.ts` and not given a type here (or * given one here and left off the roster) is a compile error, and the binding * refusal in `source-names.ts` reads the same roster, so the protection can * never lag the vocabulary again. */ export declare const coreVocabularyTypes: Record; export declare function coreVocabularyType(name: string): ValueType | null; /** * D50 rule 90 / D52 rule 116: the modules whose named imports retired, and the * prefix that replaced them. `velar/collections` is the odd one — `range` went * to the Core prelude rather than to a namespace, so its migration drops the * import and adds no prefix at all. * * D57 rule 136: the member sets are read off the namespace types rather than * restated, so this table cannot claim a member the namespace does not carry. */ export declare const permanentNamespaceImportRosters: ReadonlyMap; }>; export declare function permanentNamespaceImportRoster(source: string): { readonly namespace: PermanentNamespaceName | null; readonly members: ReadonlySet; } | null; /** * D57 rule 136: the permanent namespace that reaches every export of a retired * standard module, or null while the module still publishes something of its * own. Derived from the roster VEL3008 rejects imports with, so a diagnostic * cannot list a module as importable after its members moved behind a prefix. */ export declare function permanentNamespaceCoveringModule(source: string, exports: Iterable): PermanentNamespaceName | null; /** * The two boundary questions a Core type has to answer for a target that * serializes it: may this value cross a JSON boundary, and can this field be * decoded from an HTML form. * * D114 R1f: both were private methods of `analyzer.ts` reached only through * `CompilerIntrinsicAnalysisContext`, so every caller — an intrinsic call, a * `velar/http` body, a Web form read — was already asking the vocabulary a * question about a type rather than about a program. They live here because * the answer is a property of the type, not of the call that asked. */ export interface BoundaryVocabularyHost { boundOf(type: Extract): TypeParameterBound | null; readonly enums: ReadonlyMap; expandAliases(type: ValueType, seen?: ReadonlySet): ValueType; fieldsOf(identity: string): ReadonlyMap | null; resolveNamedClasses(type: ValueType): ValueType; typeError(message: string, errorSpan: Span, fix?: DiagnosticFix): void; } export declare class BoundaryVocabulary { private readonly host; constructor(host: BoundaryVocabularyHost); formReadField(name: string, source: ValueType, fieldSpan: Span): FormReadField | null; jsonSerializable(source: ValueType, seen?: ReadonlySet): boolean | null; isHttpFormBody(source: ValueType): boolean; private combineJsonStatuses; } //# sourceMappingURL=vocabulary.d.ts.map