Skip to content

Env

Env is the declaration and type environment used by the checker.

new Env(container, provider, options?, declarations?): Env

Container

Registry

CheckerOptions = {}

Scopes = ...

Env

readonly aggLitElemType: number


readonly container: Container


readonly declarations: Scopes


readonly filteredOverloadIds: Set<string>


readonly jsonFieldNames: boolean


readonly provider: Registry

addFunctions(…declarations): void

addFunctions adds function declarations into the current scope.

…FunctionDecl[]

void


addIdents(…declarations): void

addIdents adds variable declarations into the current scope.

…VariableDecl[]

void


enterScope(): Env

enterScope creates a child environment with a fresh innermost scope.

Env


exitScope(): Env

exitScope restores the parent declaration scope.

Env


isOverloadDisabled(overloadId): boolean

isOverloadDisabled reports whether an overload is filtered by environment policy.

string

boolean


lookupFunction(name): FunctionDecl | undefined

lookupFunction finds a function by container resolution order.

string

FunctionDecl | undefined


resolveQualifiedIdent(…qualifiers): attributeResolution | undefined

resolveQualifiedIdent resolves a select-chain as a qualified identifier when possible.

…string[]

attributeResolution | undefined


resolveSimpleIdent(name): attributeResolution | undefined

resolveSimpleIdent resolves an unqualified identifier against local and container scopes.

string

attributeResolution | undefined


resolveTypeIdent(name): VariableDecl | undefined

resolveTypeIdent resolves a type name as an identifier-like declaration.

string

VariableDecl | undefined


validatedDeclarations(): Scopes

validatedDeclarations returns the declaration stack for reuse in a new environment.

Scopes