[I] Program
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
checker | public | Checker | DANGER Using the checker is reserved for advanced usage and should be used with caution. API are not subject to the same stability guarantees see See https://typespec.io/docs/handbook/breaking-change-policy/ |
compilerOptions | public | CompilerOptions | - |
diagnostics | readonly | readonly Diagnostic[] | - |
emitters | public | EmitterRef[] | - |
host | public | CompilerHost | - |
jsSourceFiles | public | Map<string, JsSourceFileNode> | - |
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. |
tracer | public | Tracer | - |
Methods
getGlobalNamespaceType()
getGlobalNamespaceType(): Namespace;Returns
getSourceFileLocationContext()
getSourceFileLocationContext(sourceFile): LocationContext;Return location context of the given source file.
Parameters
| Parameter | Type |
|---|---|
sourceFile | SourceFile |
Returns
hasError()
hasError(): boolean;Returns
boolean
reportDiagnostic()
reportDiagnostic(diagnostic): void;Parameters
| Parameter | Type |
|---|---|
diagnostic | Diagnostic |
Returns
void
reportDiagnostics()
reportDiagnostics(diagnostics): void;Parameters
| Parameter | Type |
|---|---|
diagnostics | readonly Diagnostic[] |
Returns
void
resolveTypeReference()
resolveTypeReference(reference): [undefined | Type, readonly Diagnostic[]];Parameters
| Parameter | Type |
|---|---|
reference | string |
Returns
[undefined | Type, readonly Diagnostic[]]
stateMap()
stateMap(key): Map<Type, any>;Parameters
| Parameter | Type |
|---|---|
key | symbol |
Returns
Map<Type, any>
stateSet()
stateSet(key): Set<Type>;Parameters
| Parameter | Type |
|---|---|
key | symbol |
Returns
Set<Type>
trace()
trace(area, message): void;Parameters
| Parameter | Type |
|---|---|
area | string |
message | string |
Returns
void