[I] ProjectedProgram
Extends
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
checker | public | Checker | - | Program.checker |
compilerOptions | public | CompilerOptions | - | Program.compilerOptions |
diagnostics | readonly | readonly Diagnostic[] | - | Program.diagnostics |
emitters | public | EmitterRef[] | - | Program.emitters |
host | public | CompilerHost | - | Program.host |
jsSourceFiles | public | Map<string, JsSourceFileNode> | - | Program.jsSourceFiles |
literalTypes | public | Map<string | number | boolean, LiteralType> | - | Program.literalTypes |
mainFile? | public | TypeSpecScriptNode | - | Program.mainFile |
projector | public | Projector | - | - |
projectRoot | readonly | string | Project root. If a tsconfig was found/specified this is the directory for the tsconfig.json. Otherwise directory where the entrypoint is located. | Program.projectRoot |
sourceFiles | public | Map<string, TypeSpecScriptNode> | All source files in the program, keyed by their file path. | Program.sourceFiles |
stateMaps | public | Map<symbol, StateMap> | - | Program.stateMaps |
stateSets | public | Map<symbol, StateSet> | - | Program.stateSets |
tracer | public | Tracer | - | Program.tracer |
Methods
getGlobalNamespaceType()
getGlobalNamespaceType(): NamespaceReturns
Inherited from
Program.getGlobalNamespaceType
getOption()
getOption(key): undefined | stringParameters
| Parameter | Type |
|---|---|
key | string |
Returns
undefined | string
Inherited from
getSourceFileLocationContext()
getSourceFileLocationContext(sourceFile): LocationContextReturn location context of the given source file.
Parameters
| Parameter | Type |
|---|---|
sourceFile | SourceFile |
Returns
Inherited from
Program.getSourceFileLocationContext
hasError()
hasError(): booleanReturns
boolean
Inherited from
loadTypeSpecScript()
loadTypeSpecScript(typespecScript): Promise<TypeSpecScriptNode>Parameters
| Parameter | Type |
|---|---|
typespecScript | SourceFile |
Returns
Promise<TypeSpecScriptNode>
Inherited from
onValidate()
onValidate(cb, LibraryMetadata): voidParameters
| Parameter | Type |
|---|---|
cb | (program) => void | Promise<void> |
LibraryMetadata | LibraryMetadata |
Returns
void
Inherited from
reportDiagnostic()
reportDiagnostic(diagnostic): voidParameters
| Parameter | Type |
|---|---|
diagnostic | Diagnostic |
Returns
void
Inherited from
reportDiagnostics()
reportDiagnostics(diagnostics): voidParameters
| Parameter | Type |
|---|---|
diagnostics | readonly Diagnostic[] |
Returns
void
Inherited from
reportDuplicateSymbols()
reportDuplicateSymbols(symbols): voidParameters
| Parameter | Type |
|---|---|
symbols | undefined | SymbolTable |
Returns
void
Inherited from
Program.reportDuplicateSymbols
resolveTypeReference()
resolveTypeReference(reference): [undefined | Type, readonly Diagnostic[]]Parameters
| Parameter | Type |
|---|---|
reference | string |
Returns
[undefined | Type, readonly Diagnostic[]]
Inherited from
stateMap()
stateMap(key): Map<Type, any>Parameters
| Parameter | Type |
|---|---|
key | symbol |
Returns
Map<Type, any>
Inherited from
stateSet()
stateSet(key): Set<Type>Parameters
| Parameter | Type |
|---|---|
key | symbol |
Returns
Set<Type>
Inherited from
trace()
trace(area, message): voidParameters
| Parameter | Type |
|---|---|
area | string |
message | string |
Returns
void