Skip to content

[I] ProjectedProgram

Extends

Properties

PropertyModifierTypeDescriptionInherited from
checkerpublicChecker-Program.checker
compilerOptionspublicCompilerOptions-Program.compilerOptions
diagnosticsreadonlyreadonly Diagnostic[]-Program.diagnostics
emitterspublicEmitterRef[]-Program.emitters
hostpublicCompilerHost-Program.host
jsSourceFilespublicMap<string, JsSourceFileNode>-Program.jsSourceFiles
literalTypespublicMap<string | number | boolean, LiteralType>-Program.literalTypes
mainFile?publicTypeSpecScriptNode-Program.mainFile
projectorpublicProjector--
projectRootreadonlystringProject root. If a tsconfig was found/specified this is the directory for the tsconfig.json. Otherwise directory where the entrypoint is located.Program.projectRoot
sourceFilespublicMap<string, TypeSpecScriptNode>All source files in the program, keyed by their file path.Program.sourceFiles
stateMapspublicMap<symbol, StateMap>-Program.stateMaps
stateSetspublicMap<symbol, StateSet>-Program.stateSets
tracerpublicTracer-Program.tracer

Methods

getGlobalNamespaceType()

getGlobalNamespaceType(): Namespace

Returns

Namespace

Inherited from

Program.getGlobalNamespaceType


getOption()

getOption(key): undefined | string

Parameters

ParameterType
keystring

Returns

undefined | string

Inherited from

Program.getOption


getSourceFileLocationContext()

getSourceFileLocationContext(sourceFile): LocationContext

Return location context of the given source file.

Parameters

ParameterType
sourceFileSourceFile

Returns

LocationContext

Inherited from

Program.getSourceFileLocationContext


hasError()

hasError(): boolean

Returns

boolean

Inherited from

Program.hasError


loadTypeSpecScript()

loadTypeSpecScript(typespecScript): Promise<TypeSpecScriptNode>

Parameters

ParameterType
typespecScriptSourceFile

Returns

Promise<TypeSpecScriptNode>

Inherited from

Program.loadTypeSpecScript


onValidate()

onValidate(cb, LibraryMetadata): void

Parameters

ParameterType
cb(program) => void | Promise<void>
LibraryMetadataLibraryMetadata

Returns

void

Inherited from

Program.onValidate


reportDiagnostic()

reportDiagnostic(diagnostic): void

Parameters

ParameterType
diagnosticDiagnostic

Returns

void

Inherited from

Program.reportDiagnostic


reportDiagnostics()

reportDiagnostics(diagnostics): void

Parameters

ParameterType
diagnosticsreadonly Diagnostic[]

Returns

void

Inherited from

Program.reportDiagnostics


reportDuplicateSymbols()

reportDuplicateSymbols(symbols): void

Parameters

ParameterType
symbolsundefined | SymbolTable

Returns

void

Inherited from

Program.reportDuplicateSymbols


resolveTypeReference()

resolveTypeReference(reference): [undefined | Type, readonly Diagnostic[]]

Parameters

ParameterType
referencestring

Returns

[undefined | Type, readonly Diagnostic[]]

Inherited from

Program.resolveTypeReference


stateMap()

stateMap(key): Map<Type, any>

Parameters

ParameterType
keysymbol

Returns

Map<Type, any>

Inherited from

Program.stateMap


stateSet()

stateSet(key): Set<Type>

Parameters

ParameterType
keysymbol

Returns

Set<Type>

Inherited from

Program.stateSet


trace()

trace(area, message): void

Parameters

ParameterType
areastring
messagestring

Returns

void

Inherited from

Program.trace