[I] Program
Properties
Section titled “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
Section titled “Methods”getGlobalNamespaceType()
Section titled “getGlobalNamespaceType()”getGlobalNamespaceType(): Namespace;Returns
Section titled “Returns”getSourceFileLocationContext()
Section titled “getSourceFileLocationContext()”getSourceFileLocationContext(sourceFile): LocationContext;Return location context of the given source file.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
sourceFile | SourceFile |
Returns
Section titled “Returns”hasError()
Section titled “hasError()”hasError(): boolean;Returns
Section titled “Returns”boolean
reportDiagnostic()
Section titled “reportDiagnostic()”reportDiagnostic(diagnostic): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
diagnostic | Diagnostic |
Returns
Section titled “Returns”void
reportDiagnostics()
Section titled “reportDiagnostics()”reportDiagnostics(diagnostics): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
diagnostics | readonly Diagnostic[] |
Returns
Section titled “Returns”void
resolveTypeReference()
Section titled “resolveTypeReference()”resolveTypeReference(reference): [undefined | Type, readonly Diagnostic[]];Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reference | string |
Returns
Section titled “Returns”[undefined | Type, readonly Diagnostic[]]
stateMap()
Section titled “stateMap()”stateMap(key): Map<Type, any>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key | symbol |
Returns
Section titled “Returns”Map<Type, any>
stateSet()
Section titled “stateSet()”stateSet(key): Set<Type>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key | symbol |
Returns
Section titled “Returns”Set<Type>
trace()
Section titled “trace()”trace(area, message): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
area | string |
message | string |
Returns
Section titled “Returns”void