[I] Program
Extended by
Properties
Property | Modifier | Type | Description |
---|---|---|---|
checker | public | Checker | - |
compilerOptions | public | CompilerOptions | - |
diagnostics | readonly | readonly Diagnostic [] | - |
emitters | public | EmitterRef [] | - |
host | public | CompilerHost | - |
jsSourceFiles | public | Map <string , JsSourceFileNode > | - |
literalTypes | public | Map <string | number | boolean , LiteralType > | - |
mainFile? | public | TypeSpecScriptNode | - |
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. |
sourceFiles | public | Map <string , TypeSpecScriptNode > | All source files in the program, keyed by their file path. |
stateMaps | public | Map <symbol , StateMap > | - |
stateSets | public | Map <symbol , StateSet > | - |
tracer | public | Tracer | - |
Methods
getGlobalNamespaceType()
Returns
getOption()
Parameters
Parameter | Type |
---|---|
key | string |
Returns
undefined
| string
getSourceFileLocationContext()
Return location context of the given source file.
Parameters
Parameter | Type |
---|---|
sourceFile | SourceFile |
Returns
hasError()
Returns
boolean
loadTypeSpecScript()
Parameters
Parameter | Type |
---|---|
typespecScript | SourceFile |
Returns
Promise
<TypeSpecScriptNode
>
onValidate()
Parameters
Parameter | Type |
---|---|
cb | (program ) => void | Promise <void > |
LibraryMetadata | LibraryMetadata |
Returns
void
reportDiagnostic()
Parameters
Parameter | Type |
---|---|
diagnostic | Diagnostic |
Returns
void
reportDiagnostics()
Parameters
Parameter | Type |
---|---|
diagnostics | readonly Diagnostic [] |
Returns
void
reportDuplicateSymbols()
Parameters
Parameter | Type |
---|---|
symbols | undefined | SymbolTable |
Returns
void
resolveTypeReference()
Parameters
Parameter | Type |
---|---|
reference | string |
Returns
[undefined
| Type
, readonly Diagnostic
[]]
stateMap()
Parameters
Parameter | Type |
---|---|
key | symbol |
Returns
Map
<Type
, any
>
stateSet()
Parameters
Parameter | Type |
---|---|
key | symbol |
Returns
Set
<Type
>
trace()
Parameters
Parameter | Type |
---|---|
area | string |
message | string |
Returns
void