Functions

Link copied to clipboard
abstract fun emit(targetSourceFile: SourceFile = definedExternally, writeFile: WriteFileCallback = definedExternally, cancellationToken: CancellationToken = definedExternally, emitOnlyDtsFiles: Boolean = definedExternally, customTransformers: CustomTransformers = definedExternally): EmitResult

Emits the JavaScript and declaration files. If targetSourceFile is not specified, then the JavaScript and declaration files will be produced for all the files in this program. If targetSourceFile is specified, then only the JavaScript and declaration for that specific file will be generated.

Link copied to clipboard
Link copied to clipboard
abstract override fun getCurrentDirectory(): String
Link copied to clipboard
abstract fun getDeclarationDiagnostics(sourceFile: SourceFile = definedExternally, cancellationToken: CancellationToken = definedExternally): ReadonlyArray<DiagnosticWithLocation>
Link copied to clipboard
abstract fun getGlobalDiagnostics(cancellationToken: CancellationToken = definedExternally): ReadonlyArray<Diagnostic>
Link copied to clipboard
abstract fun getIdentifierCount(): Double
Link copied to clipboard
Link copied to clipboard

Calculates the final resolution mode for an import at some index within a file's imports list. This is the resolution mode explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In --module node16 or nodenext, this may depend on the file's impliedNodeFormat. In --module preserve, it depends only on the input syntax of the reference. In other module modes, when overriding import attributes are not provided, this function returns undefined, as the result would have no impact on module resolution, emit, or type checking.

Link copied to clipboard

Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In --module node16 or nodenext, this may depend on the file's impliedNodeFormat. In --module preserve, it depends only on the input syntax of the reference. In other module modes, when overriding import attributes are not provided, this function returns undefined, as the result would have no impact on module resolution, emit, or type checking.

Link copied to clipboard
abstract fun getNodeCount(): Double
Link copied to clipboard
abstract fun getOptionsDiagnostics(cancellationToken: CancellationToken = definedExternally): ReadonlyArray<Diagnostic>
Link copied to clipboard
Link copied to clipboard

Get a list of root file names that were passed to a 'createProgram'

Link copied to clipboard
abstract fun getSemanticDiagnostics(sourceFile: SourceFile = definedExternally, cancellationToken: CancellationToken = definedExternally): ReadonlyArray<Diagnostic>

The first time this is called, it will return global diagnostics (no location).

Link copied to clipboard
abstract fun getSourceFile(fileName: String): SourceFile?
Link copied to clipboard
abstract fun getSourceFileByPath(path: Path): SourceFile?
Link copied to clipboard

Get a list of files in the program

Link copied to clipboard
abstract fun getSymbolCount(): Double
Link copied to clipboard
abstract fun getSyntacticDiagnostics(sourceFile: SourceFile = definedExternally, cancellationToken: CancellationToken = definedExternally): ReadonlyArray<DiagnosticWithLocation>
Link copied to clipboard
abstract fun getTypeChecker(): TypeChecker

Gets a type checker that can be used to semantically analyze source files in the program.

Link copied to clipboard
abstract fun getTypeCount(): Double
Link copied to clipboard