Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
sealed external interface BufferEncoding
Link copied to clipboard
external interface BuilderProgram

Builder to manage the program state changes

Link copied to clipboard
external interface BuilderProgramHost
Link copied to clipboard
Link copied to clipboard
external interface CheckJsDirective : TextRange
Link copied to clipboard
external interface ClassificationInfo
Link copied to clipboard
external interface ClassificationResult
Link copied to clipboard
external class ClassificationType
Link copied to clipboard
Link copied to clipboard
external interface ClassifiedSpan
Link copied to clipboard
external interface ClassifiedSpan2020
Link copied to clipboard
external interface Classifier
Link copied to clipboard

Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program

Link copied to clipboard
external interface CustomTransformer
Link copied to clipboard
external interface DiagnosticMessageChain

A linked list of formatted diagnostic messages to be used as part of a multiline message. It is built from the bottom up, leaving the head to be the "main" diagnostic. While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, the difference is that messages are all preformatted in DMC.

Link copied to clipboard
typealias DirectoryWatcherCallback = (fileName: String) -> Unit
Link copied to clipboard
external interface DocumentRegistry

The document registry represents a store of SourceFile objects that can be shared between multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) of files in the context. SourceFile objects account for most of the memory usage by the language service. Sharing the same DocumentRegistry instance between different instances of LanguageService allow for more efficient memory utilization since all projects will share at least the library file (lib.d.ts).

Link copied to clipboard
Link copied to clipboard

The builder that can handle the changes in program and iterate through changed file to emit the files The semantic diagnostics are cached per file and managed by clearing for the changed/affected files

Link copied to clipboard
external class EmitFlags : Bitmask<EmitFlags>
Link copied to clipboard
Link copied to clipboard
external class ExitStatus

Return code used by getEmitOutput function to indicate status of the function

Link copied to clipboard
external class Extension
Link copied to clipboard
external interface FileWatcher
Link copied to clipboard
typealias FileWatcherCallback = (fileName: String, eventKind: FileWatcherEventKind, modifiedTime: Date?) -> Unit
Link copied to clipboard
external class FileWatcherEventKind
Link copied to clipboard
external interface HostCancellationToken
Link copied to clipboard
external interface IncompleteCompletionsCache
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external interface InlayHintsContext
Link copied to clipboard
external interface InstallPackageOptions
Link copied to clipboard
typealias InvalidatedProject<T> = Any
Link copied to clipboard
external interface InvalidatedProjectBase
Link copied to clipboard
Link copied to clipboard
external interface IScriptSnapshot

Represents an immutable snapshot of a script at a specified time.Once acquired, the snapshot is observably immutable. i.e. the same calls with the same parameters will return the same values.

Link copied to clipboard
external object JsTyping
Link copied to clipboard
external class JsxFlags
Link copied to clipboard
external class LanguageServiceMode
Link copied to clipboard

Used by services to specify the minimum host area required to set up source files under any compilation settings

Link copied to clipboard
Link copied to clipboard
external interface NodesVisitor

A function that walks a node array using the given visitor, returning an array whose contents satisfy the test.

Link copied to clipboard
external interface NodeVisitor

A function that walks a node using the given visitor, lifting node arrays into single nodes, returning an node which satisfies the test.

Link copied to clipboard
Link copied to clipboard
external class OutputFileType
Link copied to clipboard
Link copied to clipboard
external interface ParsedBuildCommand

Parsed command line for build

Link copied to clipboard
external interface PerformanceEvent
Link copied to clipboard
sealed external interface PerformanceEventKind
Link copied to clipboard
external interface PreProcessedFileInfo
Link copied to clipboard
external interface PrinterOptions
Link copied to clipboard
external interface PrintHandlers
Link copied to clipboard
external interface ProgramHost<T : BuilderProgram>
Link copied to clipboard
external class ProgramUpdateLevel
Link copied to clipboard
external interface ReadBuildProgramHost
Link copied to clipboard
Link copied to clipboard
external interface ReportFileInError
Link copied to clipboard
external interface RequiredAffectedFileResult<T>
Link copied to clipboard

Branded string for keeping track of when we've turned an ambiguous path specified like "./blah" to an absolute path to an actual tsconfig file, e.g. "/root/blah/tsconfig.json"

Link copied to clipboard
Link copied to clipboard
external object ScriptSnapshot
Link copied to clipboard

The builder that caches the semantic diagnostics for the program and handles the changed files and affected files

Link copied to clipboard
external interface SolutionBuilder<T : BuilderProgram>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias SortedArray<T> = JsArray<T>
Link copied to clipboard
Link copied to clipboard
external interface SourceMapSpan
Link copied to clipboard
external class SymbolDisplayPartKind
Link copied to clipboard
external interface System
Link copied to clipboard
external class TokenClass
Link copied to clipboard
external interface TransformationResult<T : Node>
Link copied to clipboard
typealias Transformer<T> = (node: T) -> T

A function that transforms a node.

Link copied to clipboard

A function that is used to initialize and return a Transformer callback, which in turn will be used to transform one or more nodes.

Link copied to clipboard
Link copied to clipboard
external interface Watch<T>
Link copied to clipboard
Link copied to clipboard

Host to create watch with config file

Host to create watch with root files and options

Link copied to clipboard
external interface WatchHost

Host that has watch functionality used in --watch mode

Link copied to clipboard
external interface WatchOfConfigFile<T> : Watch<T>

Creates the watch what generates program using the config file

Link copied to clipboard
external interface WatchOfFilesAndCompilerOptions<T> : Watch<T>

Creates the watch that generates program using the root files and compiler options

Link copied to clipboard
typealias WatchStatusReporter = (diagnostic: Diagnostic, newLine: String, options: CompilerOptions, errorCount: Int?) -> Unit

Properties

Link copied to clipboard
val BufferEncoding.Companion.ascii: BufferEncoding
Link copied to clipboard
val BufferEncoding.Companion.base64: BufferEncoding
Link copied to clipboard
val BufferEncoding.Companion.binary: BufferEncoding
Link copied to clipboard
val PerformanceEventKind.Companion.CreatePackageJsonAutoImportProvider: PerformanceEventKind
Link copied to clipboard
val BufferEncoding.Companion.hex: BufferEncoding
Link copied to clipboard
val BufferEncoding.Companion.latin1: BufferEncoding
Link copied to clipboard
external val servicesVersion: Any?

The version of the language service API

Link copied to clipboard
external var sys: System
Link copied to clipboard
val BufferEncoding.Companion.ucs2: BufferEncoding
Link copied to clipboard
Link copied to clipboard
val PerformanceEventKind.Companion.UpdateGraph: PerformanceEventKind
Link copied to clipboard
val BufferEncoding.Companion.utf16le: BufferEncoding
Link copied to clipboard
val BufferEncoding.Companion.utf8: BufferEncoding
Link copied to clipboard
external val version: String

The version of the TypeScript compiler release

Link copied to clipboard
external val versionMajorMinor: Any?

Functions

Link copied to clipboard
external fun <T : Node> addEmitHelper(node: T, helper: EmitHelper): T

Adds an EmitHelper to a node.

Link copied to clipboard
external fun <T : Node> addEmitHelpers(node: T, helpers: ReadonlyArray<EmitHelper>?): T

Add EmitHelpers to a node.

Link copied to clipboard
external fun <T : Node> addSyntheticLeadingComment(node: T, kind: SyntaxKind.MultiLineCommentTrivia, text: String, hasTrailingNewLine: Boolean = definedExternally): T
external fun <T : Node> addSyntheticLeadingComment(node: T, kind: SyntaxKind.SingleLineCommentTrivia, text: String, hasTrailingNewLine: Boolean = definedExternally): T
Link copied to clipboard
external fun <T : Node> addSyntheticTrailingComment(node: T, kind: SyntaxKind.MultiLineCommentTrivia, text: String, hasTrailingNewLine: Boolean = definedExternally): T
external fun <T : Node> addSyntheticTrailingComment(node: T, kind: SyntaxKind.SingleLineCommentTrivia, text: String, hasTrailingNewLine: Boolean = definedExternally): T
Link copied to clipboard
external fun bundlerModuleNameResolver(moduleName: String, containingFile: String, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache: ModuleResolutionCache = definedExternally, redirectedReference: ResolvedProjectReference = definedExternally): ResolvedModuleWithFailedLookupLocations
Link copied to clipboard
external fun classicNameResolver(moduleName: String, containingFile: String, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache: NonRelativeModuleNameResolutionCache = definedExternally, redirectedReference: ResolvedProjectReference = definedExternally): ResolvedModuleWithFailedLookupLocations

Called to merge all the changes that occurred across several versions of a script snapshot into a single change. i.e. if a user keeps making successive edits to a script we will have a text change from V1 to V2, V2 to V3, ..., Vn.

Link copied to clipboard
external fun convertCompilerOptionsFromJson(jsonOptions: Any?, basePath: String, configFileName: String = definedExternally): ConvertCompilerOptionsFromJsonResult
Link copied to clipboard
external fun convertToObject(sourceFile: JsonSourceFile, errors: ReadonlyArray<Diagnostic>): Any?

Convert the json syntax tree into the json value

Link copied to clipboard
external fun convertTypeAcquisitionFromJson(jsonOptions: Any?, basePath: String, configFileName: String = definedExternally): ConvertTypeAcquisitionFromJsonResult
Link copied to clipboard
external fun createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram: BuilderProgram = definedExternally, configFileParsingDiagnostics: ReadonlyArray<Diagnostic> = definedExternally): BuilderProgram

Creates a builder thats just abstraction over program and can be used with watch

external fun createAbstractBuilder(rootNames: ReadonlyArray<String>?, options: CompilerOptions?, host: CompilerHost = definedExternally, oldProgram: BuilderProgram = definedExternally, configFileParsingDiagnostics: ReadonlyArray<Diagnostic> = definedExternally, projectReferences: ReadonlyArray<ProjectReference> = definedExternally): BuilderProgram
Link copied to clipboard
external fun createBuilderStatusReporter(system: System, pretty: Boolean = definedExternally): DiagnosticReporter

Create a function that reports watch status by writing to the system and handles the formating of the diagnostic

Link copied to clipboard

The classifier is used for syntactic highlighting in editors via the TSServer

Link copied to clipboard
external fun createCompilerHost(options: CompilerOptions, setParentNodes: Boolean = definedExternally): CompilerHost
Link copied to clipboard
external fun createDocumentRegistry(useCaseSensitiveFileNames: Boolean = definedExternally, currentDirectory: String = definedExternally, jsDocParsingMode: JSDocParsingMode = definedExternally): DocumentRegistry
external fun createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram: EmitAndSemanticDiagnosticsBuilderProgram = definedExternally, configFileParsingDiagnostics: ReadonlyArray<Diagnostic> = definedExternally): EmitAndSemanticDiagnosticsBuilderProgram

Create the builder that can handle the changes in program and iterate through changed files to emit the those files and manage semantic diagnostics cache as well

external fun createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: ReadonlyArray<String>?, options: CompilerOptions?, host: CompilerHost = definedExternally, oldProgram: EmitAndSemanticDiagnosticsBuilderProgram = definedExternally, configFileParsingDiagnostics: ReadonlyArray<Diagnostic> = definedExternally, projectReferences: ReadonlyArray<ProjectReference> = definedExternally): EmitAndSemanticDiagnosticsBuilderProgram
Link copied to clipboard
external fun createIncrementalCompilerHost(options: CompilerOptions, system: System = definedExternally): CompilerHost
Link copied to clipboard
Link copied to clipboard
external fun createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry = definedExternally, syntaxOnlyOrLanguageServiceMode: Boolean = definedExternally): LanguageService
external fun createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry = definedExternally, syntaxOnlyOrLanguageServiceMode: LanguageServiceMode = definedExternally): LanguageService
Link copied to clipboard
external fun createLanguageServiceSourceFile(fileName: String, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget, version: String, setNodeParents: Boolean, scriptKind: ScriptKind = definedExternally): SourceFile
external fun createLanguageServiceSourceFile(fileName: String, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: CreateSourceFileOptions, version: String, setNodeParents: Boolean, scriptKind: ScriptKind = definedExternally): SourceFile
Link copied to clipboard
external fun createModuleResolutionCache(currentDirectory: String, getCanonicalFileName: (s: String) -> String, options: CompilerOptions = definedExternally, packageJsonInfoCache: PackageJsonInfoCache = definedExternally): ModuleResolutionCache
Link copied to clipboard
external fun createPrinter(printerOptions: PrinterOptions = definedExternally, handlers: PrintHandlers = definedExternally): Printer
Link copied to clipboard
external fun createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram: SemanticDiagnosticsBuilderProgram = definedExternally, configFileParsingDiagnostics: ReadonlyArray<Diagnostic> = definedExternally): SemanticDiagnosticsBuilderProgram

Create the builder to manage semantic diagnostics and cache them

external fun createSemanticDiagnosticsBuilderProgram(rootNames: ReadonlyArray<String>?, options: CompilerOptions?, host: CompilerHost = definedExternally, oldProgram: SemanticDiagnosticsBuilderProgram = definedExternally, configFileParsingDiagnostics: ReadonlyArray<Diagnostic> = definedExternally, projectReferences: ReadonlyArray<ProjectReference> = definedExternally): SemanticDiagnosticsBuilderProgram
Link copied to clipboard
Link copied to clipboard
external fun <T : BuilderProgram> createSolutionBuilderHost(system: System = definedExternally, createProgram: CreateProgram<T> = definedExternally, reportDiagnostic: DiagnosticReporter = definedExternally, reportSolutionBuilderStatus: DiagnosticReporter = definedExternally, reportErrorSummary: ReportEmitErrorSummary = definedExternally): SolutionBuilderHost<T>
Link copied to clipboard
external fun <T : BuilderProgram> createSolutionBuilderWithWatch(host: SolutionBuilderWithWatchHost<T>, rootNames: ReadonlyArray<String>, defaultOptions: BuildOptions, baseWatchOptions: WatchOptions = definedExternally): SolutionBuilder<T>
Link copied to clipboard
external fun <T : BuilderProgram> createSolutionBuilderWithWatchHost(system: System = definedExternally, createProgram: CreateProgram<T> = definedExternally, reportDiagnostic: DiagnosticReporter = definedExternally, reportSolutionBuilderStatus: DiagnosticReporter = definedExternally, reportWatchStatus: WatchStatusReporter = definedExternally): SolutionBuilderWithWatchHost<T>
Link copied to clipboard
external fun createSourceMapSource(fileName: String, text: String, skipTrivia: (pos: Int) -> Int = definedExternally): SourceMapSource

Create an external source map source file reference

Link copied to clipboard
external fun createTextChangeRange(span: TextSpan, newLength: Int): TextChangeRange
Link copied to clipboard
external fun createTextSpan(start: Int, length: Int): TextSpan
Link copied to clipboard
external fun createTextSpanFromBounds(start: Int, end: Int): TextSpan
external fun createTypeReferenceDirectiveResolutionCache(currentDirectory: String, getCanonicalFileName: (s: String) -> String, options: CompilerOptions = definedExternally, packageJsonInfoCache: PackageJsonInfoCache = definedExternally): TypeReferenceDirectiveResolutionCache
Link copied to clipboard
external fun <T : BuilderProgram> createWatchCompilerHost(rootFiles: ReadonlyArray<String>, options: CompilerOptions, system: System, createProgram: CreateProgram<T> = definedExternally, reportDiagnostic: DiagnosticReporter = definedExternally, reportWatchStatus: WatchStatusReporter = definedExternally, projectReferences: ReadonlyArray<ProjectReference> = definedExternally, watchOptions: WatchOptions = definedExternally): WatchCompilerHostOfFilesAndCompilerOptions<T>

external fun <T : BuilderProgram> createWatchCompilerHost(configFileName: String, optionsToExtend: CompilerOptions?, system: System, createProgram: CreateProgram<T> = definedExternally, reportDiagnostic: DiagnosticReporter = definedExternally, reportWatchStatus: WatchStatusReporter = definedExternally, watchOptionsToExtend: WatchOptions = definedExternally, extraFileExtensions: ReadonlyArray<FileExtensionInfo> = definedExternally): WatchCompilerHostOfConfigFile<T>

Create the watch compiler host for either configFile or fileNames and its options

Link copied to clipboard

Creates the watch from the host for config file

Creates the watch from the host for root files and compiler options

Link copied to clipboard
external fun decodedTextSpanIntersectsWith(start1: Int, length1: Int, start2: Int, length2: Int): Boolean
Link copied to clipboard
Link copied to clipboard
external fun disposeEmitNodes(sourceFile: SourceFile?)

Clears any EmitNode entries from parse-tree nodes.

Link copied to clipboard
external fun findAncestor(node: Node?, callback: (element: Node) -> Any): Node?

external fun <T : Node> findAncestor(node: Node?, callback: (element: Node) -> Boolean): T?

Iterates through the parent chain of a node and performs the callback on each parent until the callback returns a truthy value, then returns that value. If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" At that point findAncestor returns undefined.

Link copied to clipboard
external fun findConfigFile(searchPath: String, fileExists: (fileName: String) -> Boolean, configName: String = definedExternally): String?
Link copied to clipboard
external fun flattenDiagnosticMessageText(diag: String?, newLine: String, indent: Int = definedExternally): String
external fun flattenDiagnosticMessageText(diag: DiagnosticMessageChain?, newLine: String, indent: Int = definedExternally): String
Link copied to clipboard
external fun formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): String
Link copied to clipboard
Link copied to clipboard

If the text of an Identifier matches a keyword (including contextual and TypeScript-specific keywords), returns the SyntaxKind for the matching keyword.

Link copied to clipboard
external fun idText(identifierOrPrivateName: Identifier): String
external fun idText(identifierOrPrivateName: PrivateIdentifier): String
Link copied to clipboard
external fun isBuildCommand(commandLineArgs: ReadonlyArray<String>): Boolean

Returns true if commandline is --build and needs to be parsed useing parseBuildCommand

Link copied to clipboard
external fun isExternalModuleNameRelative(moduleName: String): Boolean
Link copied to clipboard
external fun moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) -> Boolean)

Moves matching emit helpers from a source node to a target node.

Link copied to clipboard
external fun <T : Node> moveSyntheticComments(node: T, original: Node): T
Link copied to clipboard
external fun nodeModuleNameResolver(moduleName: String, containingFile: String, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache: ModuleResolutionCache = definedExternally, redirectedReference: ResolvedProjectReference = definedExternally): ResolvedModuleWithFailedLookupLocations
Link copied to clipboard
Link copied to clipboard
external fun parseCommandLine(commandLine: ReadonlyArray<String>, readFile: (path: String) -> String? = definedExternally): ParsedCommandLine
Link copied to clipboard

Parse the text of the tsconfig.json file

Link copied to clipboard
external fun parseIsolatedEntityName(text: String, languageVersion: ScriptTarget): EntityName?
Link copied to clipboard
external fun parseJsonConfigFileContent(json: Any?, host: ParseConfigHost, basePath: String, existingOptions: CompilerOptions = definedExternally, configFileName: String = definedExternally, resolutionStack: ReadonlyArray<Path> = definedExternally, extraFileExtensions: ReadonlyArray<FileExtensionInfo> = definedExternally, extendedConfigCache: ReadonlyMap<String, ExtendedConfigCacheEntry> = definedExternally, existingWatchOptions: WatchOptions = definedExternally): ParsedCommandLine

Parse the contents of a config file (tsconfig.json).

Link copied to clipboard
external fun parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: String, existingOptions: CompilerOptions = definedExternally, configFileName: String = definedExternally, resolutionStack: ReadonlyArray<Path> = definedExternally, extraFileExtensions: ReadonlyArray<FileExtensionInfo> = definedExternally, extendedConfigCache: ReadonlyMap<String, ExtendedConfigCacheEntry> = definedExternally, existingWatchOptions: WatchOptions = definedExternally): ParsedCommandLine

Parse the contents of a config file (tsconfig.json).

Link copied to clipboard
external fun parseJsonText(fileName: String, sourceText: String): JsonSourceFile

Parse json text into SyntaxTree and return node and parse errors if any

Link copied to clipboard
external fun preProcessFile(sourceText: String, readImportFiles: Boolean = definedExternally, detectJavaScriptImports: Boolean = definedExternally): PreProcessedFileInfo
Link copied to clipboard
external fun readConfigFile(fileName: String, readFile: (path: String) -> String?): ReadConfigFileResult

Read tsconfig.json file

Link copied to clipboard
external fun readJsonConfigFile(fileName: String, readFile: (path: String) -> String?): TsConfigSourceFile

Read tsconfig.json file

Link copied to clipboard
external fun removeEmitHelper(node: Node, helper: EmitHelper): Boolean

Removes an EmitHelper from a node.

Link copied to clipboard
external fun resolveModuleName(moduleName: String, containingFile: String, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache: ModuleResolutionCache = definedExternally, redirectedReference: ResolvedProjectReference = definedExternally, resolutionMode: ResolutionMode = definedExternally): ResolvedModuleWithFailedLookupLocations
Link copied to clipboard
external fun resolveModuleNameFromCache(moduleName: String, containingFile: String, cache: ModuleResolutionCache, mode: ResolutionMode = definedExternally): ResolvedModuleWithFailedLookupLocations?
Link copied to clipboard

Returns the target config filename of a project reference. Note: The file might not exist.

Link copied to clipboard
external fun resolveTripleslashReference(moduleName: String, containingFile: String): String
Link copied to clipboard
external fun resolveTypeReferenceDirective(typeReferenceDirectiveName: String, containingFile: String?, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference: ResolvedProjectReference = definedExternally, cache: TypeReferenceDirectiveResolutionCache = definedExternally, resolutionMode: ResolutionMode = definedExternally): ResolvedTypeReferenceDirectiveWithFailedLookupLocations
Link copied to clipboard
external fun <T : Node> setCommentRange(node: T, range: TextRange): T

Sets a custom text range to use when emitting comments.

Link copied to clipboard

Sets the constant value to emit for an expression.

Link copied to clipboard
external fun <T : Node> setEmitFlags(node: T, emitFlags: EmitFlags): T

Sets flags that control emit behavior of a node.

Link copied to clipboard
external fun <T : Node> setOriginalNode(node: T, original: Node?): T
Link copied to clipboard
external fun <T : Node> setSourceMapRange(node: T, range: SourceMapRange?): T

Sets a custom text range to use when emitting source maps.

Link copied to clipboard
external fun <T : Node> setSyntheticLeadingComments(node: T, comments: ReadonlyArray<SynthesizedComment>?): T
Link copied to clipboard
external fun <T : Node> setSyntheticTrailingComments(node: T, comments: ReadonlyArray<SynthesizedComment>?): T
Link copied to clipboard
external fun <T : TextRange> setTextRange(range: T, location: TextRange?): T
Link copied to clipboard
external fun <T : Node> setTokenSourceMapRange(node: T, token: SyntaxKind, range: SourceMapRange?): T

Sets the TextRange to use for source maps for a token of a node.

Link copied to clipboard
external fun symbolName(symbol: Symbol): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external fun textSpanContainsPosition(span: TextSpan, position: Int): Boolean
Link copied to clipboard
external fun textSpanContainsTextSpan(span: TextSpan, other: TextSpan): Boolean
Link copied to clipboard
external fun textSpanEnd(span: TextSpan): Int
Link copied to clipboard
external fun textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan?
Link copied to clipboard
external fun textSpanIntersectsWith(span: TextSpan, start: Int, length: Int): Boolean
Link copied to clipboard
external fun textSpanIntersectsWithPosition(span: TextSpan, position: Int): Boolean
Link copied to clipboard
Link copied to clipboard
external fun textSpanIsEmpty(span: TextSpan): Boolean
Link copied to clipboard
external fun textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan?
Link copied to clipboard
external fun textSpanOverlapsWith(span: TextSpan, other: TextSpan): Boolean
Link copied to clipboard
Link copied to clipboard
external fun <T : Node> transform(source: T, transformers: ReadonlyArray<TransformerFactory<T>>, compilerOptions: CompilerOptions = definedExternally): TransformationResult<T>
external fun <T : Node> transform(source: ReadonlyArray<T>, transformers: ReadonlyArray<TransformerFactory<T>>, compilerOptions: CompilerOptions = definedExternally): TransformationResult<T>

Transform one or more nodes using the supplied transformers.

Link copied to clipboard
external fun transpile(input: String, compilerOptions: CompilerOptions = definedExternally, fileName: String = definedExternally, diagnostics: ReadonlyArray<Diagnostic> = definedExternally, moduleName: String = definedExternally): String
Link copied to clipboard
external fun transpileDeclaration(input: String, transpileOptions: TranspileOptions): TranspileOutput
Link copied to clipboard
external fun transpileModule(input: String, transpileOptions: TranspileOptions): TranspileOutput
Link copied to clipboard
external fun updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: String, textChangeRange: TextChangeRange?, aggressiveChecks: Boolean = definedExternally): SourceFile
Link copied to clipboard
external fun validateLocaleAndSetLanguage(locale: String, sys: ValidateLocaleAndSetLanguageSys, errors: ReadonlyArray<Diagnostic> = definedExternally)

Checks to see if the locale is in the appropriate format, and if it is, attempts to set the appropriate language.

Link copied to clipboard
external fun visitCommaListElements(elements: NodeArray<Expression>, visitor: Visitor<*, *>, discardVisitor: Visitor<*, *> = definedExternally): NodeArray<Expression>

Visits the elements of a {@link CommaListExpression}.

Link copied to clipboard
external fun visitFunctionBody(node: ConciseBody, visitor: Visitor<*, *>, context: TransformationContext): ConciseBody

Resumes a suspended lexical environment and visits a concise body, ending the lexical environment and merging hoisted declarations upon completion.

external fun visitFunctionBody(node: FunctionBody, visitor: Visitor<*, *>, context: TransformationContext): FunctionBody
external fun visitFunctionBody(node: FunctionBody?, visitor: Visitor<*, *>, context: TransformationContext): FunctionBody?

Resumes a suspended lexical environment and visits a function body, ending the lexical environment and merging hoisted declarations upon completion.

Link copied to clipboard
external fun visitIterationBody(body: Statement, visitor: Visitor<*, *>, context: TransformationContext): Statement

Visits an iteration body, adding any block-scoped variables required by the transformation.

Link copied to clipboard
external fun visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor<*, *>, context: TransformationContext, start: Int = definedExternally, ensureUseStrict: Boolean = definedExternally, nodesVisitor: NodesVisitor = definedExternally): NodeArray<Statement>

Starts a new lexical environment and visits a statement list, ending the lexical environment and merging hoisted declarations upon completion.

Link copied to clipboard
external fun visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor<*, *>, context: TransformationContext, nodesVisitor: NodesVisitor = definedExternally): NodeArray<ParameterDeclaration>

Starts a new lexical environment and visits a parameter list, suspending the lexical environment upon completion.

external fun visitParameterList(nodes: NodeArray<ParameterDeclaration>?, visitor: Visitor<*, *>, context: TransformationContext, nodesVisitor: NodesVisitor = definedExternally): NodeArray<ParameterDeclaration>?