/** * What the editor is told about a program: the type at every expression, the * type and members of every binding, and the member roster a completion offers * for a receiver. * * D115 §三: these were five private and protected methods of `Analyzer` writing * six side tables. They are not type checking — nothing here can refuse a * program — so they are their own collaborator, and `analyzer.ts` keeps only * the accessors the compiler's semantic index reads them back through. * * D114 F4: the roster itself is not decided here. It was, once — with its own * member lists, its own class-chain walk, and its own enum and `Type` member * construction — and it disagreed with the checker about the List pipeline * members, about a private field read through an applied receiver, and about a * `type` alias of an enum. `PublishedMembers` answers both questions now, so * what the editor offers is what a read of it would resolve. */ import { type Expression } from "../ast.ts"; import { type PublishedMembers } from "./published-members.ts"; import { type ValueType } from "../types.ts"; /** What the semantic recorder asks of the analyzer that hosts it, and nothing more. */ export interface SemanticIndexRecorderHost { readonly currentClass: string | null; expandAliases(type: ValueType, seen?: ReadonlySet): ValueType; isSubclassOf(actual: string, expected: string): boolean; /** * The one answer to "what does this receiver publish", shared with the type * checker. The editor's roster is that answer enumerated, never a second * reading of the same declarations. */ readonly published: PublishedMembers; readonly semanticBindingMembers: Map>; readonly semanticBindingTypes: Map; readonly semanticExpressionContexts: Map; readonly semanticExpressionMembers: Map>; readonly semanticExpressionTypes: Map; readonly semanticMemberCache: Map>; } export declare class SemanticIndexRecorder { private readonly host; constructor(host: SemanticIndexRecorderHost); recordSemanticExpression(expression: Expression, type: ValueType): void; recordSemanticBinding(key: string, type: ValueType): void; /** * The members a receiver publishes, cached per type. The private half of the * key is the class under analysis: a private member is published to a read * inside its own class and to nothing else, so one receiver has two answers * and they must not share a cache entry. */ semanticMembersOf(original: ValueType): ReadonlyMap; private privateSemanticContext; } //# sourceMappingURL=semantic-index.d.ts.map