Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace TypeScript

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

AbstractKeyword

AbstractKeyword: ModifierToken<AbstractKeyword>

AccessExpression

AccessibilityModifier

AccessibilityModifier: PublicKeyword | PrivateKeyword | ProtectedKeyword

AccessorDeclaration

AdditiveOperator

AdditiveOperator: PlusToken | MinusToken

AdditiveOperatorOrHigher

AffectedFileResult

AffectedFileResult<T>: { affected: SourceFile | Program; result: T } | undefined

Type parameters

  • T

ArrayBindingElement

ArrayBindingElement: BindingElement | OmittedExpression

ArrayBindingOrAssignmentElement

ArrayBindingOrAssignmentPattern

ArrayBindingOrAssignmentPattern: ArrayBindingPattern | ArrayLiteralExpression

AssertionExpression

AssertionExpression: TypeAssertion | AsExpression

AssertsKeyword

AssertsKeyword: KeywordToken<AssertsKeyword>

AssertsToken

AssertsToken: AssertsKeyword
deprecated

Use AssertsKeyword instead.

AssignmentOperator

AssignmentOperatorOrHigher

AssignmentOperatorToken

AssignmentOperatorToken: Token<AssignmentOperator>

AssignmentPattern

AsteriskToken

AsyncKeyword

AwaitKeyword

AwaitKeyword: KeywordToken<AwaitKeyword>

AwaitKeywordToken

AwaitKeywordToken: AwaitKeyword
deprecated

Use AwaitKeyword instead.

BaseType

BinaryOperator

BinaryOperatorToken

BinaryOperatorToken: Token<BinaryOperator>

BindingName

BindingName: Identifier | BindingPattern

BindingOrAssignmentElement

BindingOrAssignmentElementRestIndicator

BindingOrAssignmentElementRestIndicator: DotDotDotToken | SpreadElement | SpreadAssignment

BindingOrAssignmentElementTarget

BindingOrAssignmentPattern

BindingPattern

BitwiseOperator

BitwiseOperator: AmpersandToken | BarToken | CaretToken

BitwiseOperatorOrHigher

BitwiseOperatorOrHigher: EqualityOperatorOrHigher | BitwiseOperator

BlockLike

BooleanLiteral

BooleanLiteral: TrueLiteral | FalseLiteral

BreakOrContinueStatement

BreakOrContinueStatement: BreakStatement | ContinueStatement

CallLikeExpression

CaseOrDefaultClause

CaseOrDefaultClause: CaseClause | DefaultClause

ClassLikeDeclaration

ClassLikeDeclaration: ClassDeclaration | ClassExpression

ClassMemberModifier

CodeActionCommand

CodeActionCommand: InstallPackageAction

ColonToken

CommentKind

CompilerOptionsValue

CompilerOptionsValue: string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined

CompletionsTriggerCharacter

CompletionsTriggerCharacter: "." | "\"" | "'" | "`" | "/" | "@" | "<" | "#" | " "

CompoundAssignmentOperator

ConciseBody

ConciseBody: FunctionBody | Expression

ConstKeyword

CreateProgram

CreateProgram<T>: (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]) => T

Type parameters

Type declaration

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

      Parameters

      Returns T

CustomTransformerFactory

CustomTransformerFactory: (context: TransformationContext) => CustomTransformer

Type declaration

DeclarationName

DeclarationWithTypeParameterChildren

DeclarationWithTypeParameters

DeclareKeyword

DeclareKeyword: ModifierToken<DeclareKeyword>

DefaultKeyword

DefaultKeyword: ModifierToken<DefaultKeyword>

DestructuringAssignment

DestructuringPattern

DiagnosticReporter

DiagnosticReporter: (diagnostic: Diagnostic) => void

Type declaration

DirectoryWatcherCallback

DirectoryWatcherCallback: (fileName: string) => void

Type declaration

    • (fileName: string): void
    • Parameters

      • fileName: string

      Returns void

DocumentRegistryBucketKey

DocumentRegistryBucketKey: string & { __bucketKey: any }

DotDotDotToken

DotToken

EmitHelper

EmitHelperUniqueNameCallback

EmitHelperUniqueNameCallback: (name: string) => string

Type declaration

    • (name: string): string
    • Parameters

      • name: string

      Returns string

EndOfFileToken

EntityName

EntityNameExpression

EntityNameOrEntityNameExpression

EntityNameOrEntityNameExpression: EntityName | EntityNameExpression

EqualityOperator

EqualityOperatorOrHigher

EqualityOperatorOrHigher: RelationalOperatorOrHigher | EqualityOperator

EqualsGreaterThanToken

EqualsGreaterThanToken: PunctuationToken<EqualsGreaterThanToken>

EqualsToken

ErrorCallback

ErrorCallback: (message: DiagnosticMessage, length: number) => void

Type declaration

ExclamationToken

ExponentiationOperator

ExponentiationOperator: AsteriskAsteriskToken

ExportKeyword

FileWatcherCallback

FileWatcherCallback: (fileName: string, eventKind: FileWatcherEventKind) => void

Type declaration

FlowNode

FlowType

FlowType: Type | IncompleteType

ForInOrOfStatement

ForInOrOfStatement: ForInStatement | ForOfStatement

ForInitializer

FunctionBody

FunctionBody: Block

FunctionLike

FunctionLike: SignatureDeclaration
deprecated

Use SignatureDeclaration

FunctionLikeDeclaration

FunctionOrConstructorTypeNode

FunctionOrConstructorTypeNode: FunctionTypeNode | ConstructorTypeNode

HasExpressionInitializer

HasInitializer

HasJSDoc

HasType

HasTypeArguments

ImportOrExportSpecifier

ImportOrExportSpecifier: ImportSpecifier | ExportSpecifier

IncrementExpression

IncrementExpression: UpdateExpression

Deprecated, please use UpdateExpression

InvalidatedProject

Type parameters

JSDocNamespaceBody

JSDocSyntaxKind

JSDocTypeReferencingNode

JsFileExtensionInfo

JsFileExtensionInfo: FileExtensionInfo
deprecated

Use FileExtensionInfo instead.

JsonObjectExpression

JsxAttributeLike

JsxAttributeLike: JsxAttribute | JsxSpreadAttribute

JsxChild

JsxOpeningLikeElement

JsxOpeningLikeElement: JsxSelfClosingElement | JsxOpeningElement

JsxTagNameExpression

JsxTokenSyntaxKind

KeywordSyntaxKind

KeywordTypeSyntaxKind

LiteralSyntaxKind

LiteralToken

LogicalOperator

LogicalOperatorOrHigher

LogicalOperatorOrHigher: BitwiseOperatorOrHigher | LogicalOperator

LogicalOrCoalescingAssignmentOperator

MemberName

MinusToken

Modifier

ModifierSyntaxKind

ModifiersArray

ModifiersArray: NodeArray<Modifier>

ModuleBody

ModuleName

ModuleReference

MultiplicativeOperator

MultiplicativeOperator: AsteriskToken | SlashToken | PercentToken

MultiplicativeOperatorOrHigher

MultiplicativeOperatorOrHigher: ExponentiationOperator | MultiplicativeOperator

NamedExportBindings

NamedExportBindings: NamespaceExport | NamedExports

NamedImportBindings

NamedImportBindings: NamespaceImport | NamedImports

NamedImportsOrExports

NamedImportsOrExports: NamedImports | NamedExports

NamespaceBody

ObjectBindingOrAssignmentElement

ObjectBindingOrAssignmentPattern

ObjectBindingOrAssignmentPattern: ObjectBindingPattern | ObjectLiteralExpression

ObjectLiteralElementLike

Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute.

ObjectTypeDeclaration

OptionalChain

OverrideKeyword

OverrideKeyword: ModifierToken<OverrideKeyword>

ParameterPropertyDeclaration

ParameterPropertyDeclaration: ParameterDeclaration & { name: Identifier; parent: ConstructorDeclaration }

ParameterPropertyModifier

ParameterPropertyModifier: AccessibilityModifier | ReadonlyKeyword

Path

Path: string & { __pathBrand: any }

PlusToken

PostfixUnaryOperator

PostfixUnaryOperator: PlusPlusToken | MinusMinusToken

PrefixUnaryOperator

PrivateKeyword

PrivateKeyword: ModifierToken<PrivateKeyword>

PropertyName

PropertyNameLiteral

ProtectedKeyword

ProtectedKeyword: ModifierToken<ProtectedKeyword>

PseudoLiteralSyntaxKind

PseudoLiteralSyntaxKind: TemplateHead | TemplateMiddle | TemplateTail

PseudoLiteralToken

PseudoLiteralToken: TemplateHead | TemplateMiddle | TemplateTail

PublicKeyword

PunctuationSyntaxKind

QuestionDotToken

QuestionToken

ReadonlyKeyword

ReadonlyKeyword: ModifierToken<ReadonlyKeyword>

ReadonlyToken

ReadonlyToken: ReadonlyKeyword
deprecated

Use ReadonlyKeyword instead.

RefactorTriggerReason

RefactorTriggerReason: "implicit" | "invoked"

RelationalOperator

RelationalOperatorOrHigher

RelationalOperatorOrHigher: ShiftOperatorOrHigher | RelationalOperator

RenameInfo

ReportEmitErrorSummary

ReportEmitErrorSummary: (errorCount: number) => void

Type declaration

    • (errorCount: number): void
    • Parameters

      • errorCount: number

      Returns void

ResolvedConfigFileName

ResolvedConfigFileName: string & { _isResolvedConfigFileName: never }

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"

ShiftOperator

ShiftOperatorOrHigher

ShiftOperatorOrHigher: AdditiveOperatorOrHigher | ShiftOperator

SignatureDeclaration

SignatureHelpRetriggerCharacter

SignatureHelpRetriggerCharacter: SignatureHelpTriggerCharacter | ")"

SignatureHelpTriggerCharacter

SignatureHelpTriggerCharacter: "," | "(" | "<"

SignatureHelpTriggerReason

StaticKeyword

StringLiteralLike

StructuredType

SuperProperty

SymbolTable

SymbolTable based on ES6 Map interface.

TemplateLiteral

TemplateLiteralToken

TokenSyntaxKind

Transformer

Transformer<T>: (node: T) => T

Type parameters

Type declaration

    • (node: T): T
    • A function that transforms a node.

      Parameters

      • node: T

      Returns T

TransformerFactory

TransformerFactory<T>: (context: TransformationContext) => Transformer<T>

Type parameters

Type declaration

TriviaSyntaxKind

TypeOfTag

TypeOfTag: "undefined" | "number" | "bigint" | "boolean" | "string" | "symbol" | "object" | "function"

TypeOnlyCompatibleAliasDeclaration

TypePredicate

TypeReferenceType

TypeVariable

UnionOrIntersectionTypeNode

UnionOrIntersectionTypeNode: UnionTypeNode | IntersectionTypeNode

UnparsedNode

UnparsedSourceText

UnparsedSourceText: UnparsedPrepend | UnparsedTextLike

VariableLikeDeclaration

VisitResult

VisitResult<T>: T | T[] | undefined

Type parameters

Visitor

Visitor: (node: Node) => VisitResult<Node>

Type declaration

WatchStatusReporter

WatchStatusReporter: (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void

Type declaration

WithMetadata

WithMetadata<T>: T & { metadata?: unknown }

Type parameters

  • T

WriteFileCallback

WriteFileCallback: (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]) => void

Type declaration

    • (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]): void
    • Parameters

      • fileName: string
      • data: string
      • writeByteOrderMark: boolean
      • Optional onError: (message: string) => void
          • (message: string): void
          • Parameters

            • message: string

            Returns void

      • Optional sourceFiles: readonly SourceFile[]

      Returns void

__String

__String: (string & { __escapedIdentifier: void }) | (void & { __escapedIdentifier: void }) | InternalSymbolName

This represents a string whose leading underscore have been escaped by adding extra leading underscores. The shape of this brand is rather unique compared to others we've used. Instead of just an intersection of a string and an object, it is that union-ed with an intersection of void and an object. This makes it wholly incompatible with a normal string (which is good, it cannot be misused on assignment or on usage), while still being comparable with a normal string via === (also good) and castable from a string.

Variables

Const factory

factory: NodeFactory

Const servicesVersion

servicesVersion: "0.8" = "0.8"

The version of the language service API

Let sys

sys: System

Let unchangedTextChangeRange

unchangedTextChangeRange: TextChangeRange

Const version

version: string

The version of the TypeScript compiler release

Const versionMajorMinor

versionMajorMinor: "4.3" = "4.3"

Functions

addEmitHelper

  • addEmitHelper<T>(node: T, helper: EmitHelper): T
  • Adds an EmitHelper to a node.

    Type parameters

    Parameters

    Returns T

addEmitHelpers

  • addEmitHelpers<T>(node: T, helpers: EmitHelper[] | undefined): T
  • Add EmitHelpers to a node.

    Type parameters

    Parameters

    Returns T

addSyntheticLeadingComment

addSyntheticTrailingComment

classicNameResolver

collapseTextChangeRangesAcrossMultipleVersions

  • 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.

    This function will then merge those changes into a single change range valid between V1 and Vn.

    Parameters

    Returns TextChangeRange

convertCompilerOptionsFromJson

  • convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { errors: Diagnostic[]; options: CompilerOptions }

convertToObject

  • Convert the json syntax tree into the json value

    Parameters

    Returns any

convertTypeAcquisitionFromJson

  • convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): { errors: Diagnostic[]; options: TypeAcquisition }

couldStartTrivia

  • couldStartTrivia(text: string, pos: number): boolean
  • Parameters

    • text: string
    • pos: number

    Returns boolean

createAbstractBuilder

Const createAdd

  • deprecated

    Use factory.createAdd or the factory supplied by your transformation context instead.

    Parameters

    Returns BinaryExpression

Const createArrayBindingPattern

  • deprecated

    Use factory.createArrayBindingPattern or the factory supplied by your transformation context instead.

    Parameters

    Returns ArrayBindingPattern

Const createArrayLiteral

  • deprecated

    Use factory.createArrayLiteralExpression or the factory supplied by your transformation context instead.

    Parameters

    • Optional elements: readonly Expression[]
    • Optional multiLine: boolean

    Returns ArrayLiteralExpression

Const createArrayTypeNode

  • deprecated

    Use factory.createArrayTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns ArrayTypeNode

Const createArrowFunction

Const createAsExpression

  • deprecated

    Use factory.createAsExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns AsExpression

Const createAssignment

  • deprecated

    Use factory.createAssignment or the factory supplied by your transformation context instead.

    Parameters

    Returns BinaryExpression

Const createAwait

  • deprecated

    Use factory.createAwaitExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns AwaitExpression

Const createBigIntLiteral

  • deprecated

    Use factory.createBigIntLiteral or the factory supplied by your transformation context instead.

    Parameters

    Returns BigIntLiteral

Const createBinary

Const createBindingElement

  • deprecated

    Use factory.createBindingElement or the factory supplied by your transformation context instead.

    Parameters

    Returns BindingElement

Const createBlock

  • createBlock(statements: readonly Statement[], multiLine?: boolean): Block
  • deprecated

    Use factory.createBlock or the factory supplied by your transformation context instead.

    Parameters

    • statements: readonly Statement[]
    • Optional multiLine: boolean

    Returns Block

Const createBreak

  • deprecated

    Use factory.createBreakStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns BreakStatement

createBuilderStatusReporter

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

    Parameters

    • system: System
    • Optional pretty: boolean

    Returns DiagnosticReporter

Const createBundle

  • deprecated

    Use factory.createBundle or the factory supplied by your transformation context instead.

    Parameters

    Returns Bundle

Const createCall

  • deprecated

    Use factory.createCallExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns CallExpression

Const createCallChain

  • deprecated

    Use factory.createCallChain or the factory supplied by your transformation context instead.

    Parameters

    Returns CallChain

Const createCallSignature

Const createCaseBlock

  • deprecated

    Use factory.createCaseBlock or the factory supplied by your transformation context instead.

    Parameters

    Returns CaseBlock

Const createCaseClause

  • deprecated

    Use factory.createCaseClause or the factory supplied by your transformation context instead.

    Parameters

    Returns CaseClause

Const createCatchClause

  • deprecated

    Use factory.createCatchClause or the factory supplied by your transformation context instead.

    Parameters

    Returns CatchClause

Const createClassDeclaration

Const createClassExpression

createClassifier

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

    Returns Classifier

Const createComma

  • deprecated

    Use factory.createComma or the factory supplied by your transformation context instead.

    Parameters

    Returns Expression

Const createCommaList

  • deprecated

    Use factory.createCommaListExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns CommaListExpression

createCompilerHost

  • Parameters

    Returns CompilerHost

Const createComputedPropertyName

  • deprecated

    Use factory.createComputedPropertyName or the factory supplied by your transformation context instead.

    Parameters

    Returns ComputedPropertyName

Const createConditional

Const createConditionalTypeNode

  • deprecated

    Use factory.createConditionalTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns ConditionalTypeNode

Const createConstructSignature

Const createConstructor

  • deprecated

    Use factory.createConstructorDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns ConstructorDeclaration

Const createConstructorTypeNode

Const createContinue

  • deprecated

    Use factory.createContinueStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ContinueStatement

Const createDebuggerStatement

  • deprecated

    Use factory.createDebuggerStatement or the factory supplied by your transformation context instead.

    Returns DebuggerStatement

Const createDecorator

  • deprecated

    Use factory.createDecorator or the factory supplied by your transformation context instead.

    Parameters

    Returns Decorator

Const createDefaultClause

  • deprecated

    Use factory.createDefaultClause or the factory supplied by your transformation context instead.

    Parameters

    Returns DefaultClause

Const createDelete

  • deprecated

    Use factory.createDeleteExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns DeleteExpression

Const createDo

  • deprecated

    Use factory.createDoStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns DoStatement

createDocumentRegistry

  • createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry
  • Parameters

    • Optional useCaseSensitiveFileNames: boolean
    • Optional currentDirectory: string

    Returns DocumentRegistry

Const createElementAccess

  • deprecated

    Use factory.createElementAccessExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns ElementAccessExpression

Const createElementAccessChain

  • deprecated

    Use factory.createElementAccessChain or the factory supplied by your transformation context instead.

    Parameters

    Returns ElementAccessChain

createEmitAndSemanticDiagnosticsBuilderProgram

Const createEmptyStatement

  • deprecated

    Use factory.createEmptyStatement or the factory supplied by your transformation context instead.

    Returns EmptyStatement

Const createEnumDeclaration

  • deprecated

    Use factory.createEnumDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns EnumDeclaration

Const createEnumMember

  • deprecated

    Use factory.createEnumMember or the factory supplied by your transformation context instead.

    Parameters

    Returns EnumMember

Const createExportAssignment

  • deprecated

    Use factory.createExportAssignment or the factory supplied by your transformation context instead.

    Parameters

    Returns ExportAssignment

Const createExportDeclaration

  • deprecated

    Use factory.createExportDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns ExportDeclaration

Const createExportDefault

  • deprecated

    Use factory.createExportDefault or the factory supplied by your transformation context instead.

    Parameters

    Returns ExportAssignment

Const createExportSpecifier

  • deprecated

    Use factory.createExportSpecifier or the factory supplied by your transformation context instead.

    Parameters

    Returns ExportSpecifier

Const createExpressionStatement

  • deprecated

    Use factory.createExpressionStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ExpressionStatement

Const createExpressionWithTypeArguments

  • deprecated

    Use factory.createExpressionWithTypeArguments or the factory supplied by your transformation context instead.

    Parameters

    Returns ExpressionWithTypeArguments

Const createExternalModuleExport

  • deprecated

    Use factory.createExternalModuleExport or the factory supplied by your transformation context instead.

    Parameters

    Returns ExportDeclaration

Const createExternalModuleReference

  • deprecated

    Use factory.createExternalModuleReference or the factory supplied by your transformation context instead.

    Parameters

    Returns ExternalModuleReference

Const createFalse

  • deprecated

    Use factory.createFalse or the factory supplied by your transformation context instead.

    Returns FalseLiteral

Const createFileLevelUniqueName

  • createFileLevelUniqueName(text: string): Identifier
  • deprecated

    Use factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel) or the factory supplied by your transformation context instead.

    Parameters

    • text: string

    Returns Identifier

Const createFor

  • deprecated

    Use factory.createForStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ForStatement

Const createForIn

  • deprecated

    Use factory.createForInStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ForInStatement

Const createForOf

  • deprecated

    Use factory.createForOfStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ForOfStatement

Const createFunctionDeclaration

Const createFunctionExpression

Const createFunctionTypeNode

Const createGetAccessor

Const createHeritageClause

Const createIdentifier

  • deprecated

    Use factory.createIdentifier or the factory supplied by your transformation context instead.

    Parameters

    • text: string

    Returns Identifier

Const createIf

  • deprecated

    Use factory.createIfStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns IfStatement

Const createImmediatelyInvokedArrowFunction

  • deprecated

    Use factory.createImmediatelyInvokedArrowFunction or the factory supplied by your transformation context instead.

    Parameters

    Returns CallExpression

  • deprecated

    Use factory.createImmediatelyInvokedArrowFunction or the factory supplied by your transformation context instead.

    Parameters

    Returns CallExpression

Const createImmediatelyInvokedFunctionExpression

  • deprecated

    Use factory.createImmediatelyInvokedFunctionExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns CallExpression

  • deprecated

    Use factory.createImmediatelyInvokedFunctionExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns CallExpression

Const createImportClause

  • deprecated

    Use factory.createImportClause or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportClause

Const createImportDeclaration

  • deprecated

    Use factory.createImportDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportDeclaration

Const createImportEqualsDeclaration

  • deprecated

    Use factory.createImportEqualsDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportEqualsDeclaration

Const createImportSpecifier

  • deprecated

    Use factory.createImportSpecifier or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportSpecifier

Const createImportTypeNode

  • deprecated

    Use factory.createImportTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportTypeNode

createIncrementalCompilerHost

createIncrementalProgram

Const createIndexSignature

Const createIndexedAccessTypeNode

  • deprecated

    Use factory.createIndexedAccessTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns IndexedAccessTypeNode

Const createInferTypeNode

  • deprecated

    Use factory.createInferTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns InferTypeNode

createInputFiles

  • createInputFiles(javascriptText: string, declarationText: string): InputFiles
  • createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles
  • createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles
  • Parameters

    • javascriptText: string
    • declarationText: string

    Returns InputFiles

  • Parameters

    • readFileText: (path: string) => string | undefined
        • (path: string): string | undefined
        • Parameters

          • path: string

          Returns string | undefined

    • javascriptPath: string
    • javascriptMapPath: string | undefined
    • declarationPath: string
    • declarationMapPath: string | undefined
    • buildInfoPath: string | undefined

    Returns InputFiles

  • Parameters

    • javascriptText: string
    • declarationText: string
    • javascriptMapPath: string | undefined
    • javascriptMapText: string | undefined
    • declarationMapPath: string | undefined
    • declarationMapText: string | undefined

    Returns InputFiles

Const createInterfaceDeclaration

Const createIntersectionTypeNode

  • deprecated

    Use factory.createIntersectionTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns IntersectionTypeNode

Const createJSDocAugmentsTag

Const createJSDocAuthorTag

  • deprecated

    Use factory.createJSDocAuthorTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocAuthorTag

Const createJSDocCallbackTag

Const createJSDocClassTag

  • deprecated

    Use factory.createJSDocClassTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocClassTag

Const createJSDocComment

  • deprecated

    Use factory.createJSDocComment or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDoc

Const createJSDocEnumTag

Const createJSDocImplementsTag

Const createJSDocParamTag

  • deprecated

    Use factory.createJSDocParameterTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocParameterTag

Const createJSDocParameterTag

Const createJSDocPrivateTag

  • deprecated

    Use factory.createJSDocPrivateTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocPrivateTag

Const createJSDocPropertyTag

Const createJSDocProtectedTag

  • deprecated

    Use factory.createJSDocProtectedTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocProtectedTag

Const createJSDocPublicTag

  • deprecated

    Use factory.createJSDocPublicTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocPublicTag

Const createJSDocReadonlyTag

  • deprecated

    Use factory.createJSDocReadonlyTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocReadonlyTag

Const createJSDocReturnTag

Const createJSDocSignature

  • deprecated

    Use factory.createJSDocSignature or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocSignature

Const createJSDocTag

  • deprecated

    Use factory.createJSDocUnknownTag or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocUnknownTag

Const createJSDocTemplateTag

Const createJSDocThisTag

Const createJSDocTypeExpression

  • deprecated

    Use factory.createJSDocTypeExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocTypeExpression

Const createJSDocTypeLiteral

  • deprecated

    Use factory.createJSDocTypeLiteral or the factory supplied by your transformation context instead.

    Parameters

    Returns JSDocTypeLiteral

Const createJSDocTypeTag

Const createJSDocTypedefTag

Const createJsxAttribute

  • deprecated

    Use factory.createJsxAttribute or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxAttribute

Const createJsxAttributes

  • deprecated

    Use factory.createJsxAttributes or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxAttributes

Const createJsxClosingElement

  • deprecated

    Use factory.createJsxClosingElement or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxClosingElement

Const createJsxElement

  • deprecated

    Use factory.createJsxElement or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxElement

Const createJsxExpression

  • deprecated

    Use factory.createJsxExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxExpression

Const createJsxFragment

  • deprecated

    Use factory.createJsxFragment or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxFragment

Const createJsxJsxClosingFragment

  • deprecated

    Use factory.createJsxJsxClosingFragment or the factory supplied by your transformation context instead.

    Returns JsxClosingFragment

Const createJsxOpeningElement

  • deprecated

    Use factory.createJsxOpeningElement or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxOpeningElement

Const createJsxOpeningFragment

  • deprecated

    Use factory.createJsxOpeningFragment or the factory supplied by your transformation context instead.

    Returns JsxOpeningFragment

Const createJsxSelfClosingElement

Const createJsxSpreadAttribute

  • deprecated

    Use factory.createJsxSpreadAttribute or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxSpreadAttribute

Const createJsxText

  • createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText
  • deprecated

    Use factory.createJsxText or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • Optional containsOnlyTriviaWhiteSpaces: boolean

    Returns JsxText

Const createKeywordTypeNode

  • deprecated

    Use factory.createKeywordTypeNode or the factory supplied by your transformation context instead.

    Type parameters

    Parameters

    • kind: TKind

    Returns KeywordTypeNode<TKind>

Const createLabel

  • deprecated

    Use factory.createLabelStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns LabeledStatement

createLanguageService

createLanguageServiceSourceFile

  • Parameters

    Returns SourceFile

Const createLessThan

  • deprecated

    Use factory.createLessThan or the factory supplied by your transformation context instead.

    Parameters

    Returns Expression

Const createLiteral

  • deprecated

    Use factory.createStringLiteral, factory.createStringLiteralFromNode, factory.createNumericLiteral, factory.createBigIntLiteral, factory.createTrue, factory.createFalse, or the factory supplied by your transformation context instead.

    Parameters

    Returns StringLiteral

  • deprecated

    Use factory.createStringLiteral, factory.createStringLiteralFromNode, factory.createNumericLiteral, factory.createBigIntLiteral, factory.createTrue, factory.createFalse, or the factory supplied by your transformation context instead.

    Parameters

    Returns NumericLiteral

  • deprecated

    Use factory.createStringLiteral, factory.createStringLiteralFromNode, factory.createNumericLiteral, factory.createBigIntLiteral, factory.createTrue, factory.createFalse, or the factory supplied by your transformation context instead.

    Parameters

    • value: boolean

    Returns BooleanLiteral

  • deprecated

    Use factory.createStringLiteral, factory.createStringLiteralFromNode, factory.createNumericLiteral, factory.createBigIntLiteral, factory.createTrue, factory.createFalse, or the factory supplied by your transformation context instead.

    Parameters

    Returns PrimaryExpression

Const createLiteralTypeNode

Const createLogicalAnd

  • deprecated

    Use factory.createLogicalAnd or the factory supplied by your transformation context instead.

    Parameters

    Returns BinaryExpression

Const createLogicalNot

  • deprecated

    Use factory.createLogicalNot or the factory supplied by your transformation context instead.

    Parameters

    Returns PrefixUnaryExpression

Const createLogicalOr

  • deprecated

    Use factory.createLogicalOr or the factory supplied by your transformation context instead.

    Parameters

    Returns BinaryExpression

Const createLoopVariable

  • createLoopVariable(reservedInNestedScopes?: boolean): Identifier
  • deprecated

    Use factory.createLoopVariable or the factory supplied by your transformation context instead.

    Parameters

    • Optional reservedInNestedScopes: boolean

    Returns Identifier

Const createMappedTypeNode

Const createMetaProperty

  • deprecated

    Use factory.createMetaProperty or the factory supplied by your transformation context instead.

    Parameters

    Returns MetaProperty

Const createMethod

Const createMethodSignature

Const createModifier

  • deprecated

    Use factory.createModifier or the factory supplied by your transformation context instead.

    Type parameters

    Parameters

    • kind: T

    Returns ModifierToken<T>

Const createModifiersFromModifierFlags

  • deprecated

    Use factory.createModifiersFromModifierFlags or the factory supplied by your transformation context instead.

    Parameters

    Returns Modifier[]

Const createModuleBlock

  • deprecated

    Use factory.createModuleBlock or the factory supplied by your transformation context instead.

    Parameters

    Returns ModuleBlock

Const createModuleDeclaration

  • deprecated

    Use factory.createModuleDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns ModuleDeclaration

createModuleResolutionCache

  • Parameters

    • currentDirectory: string
    • getCanonicalFileName: (s: string) => string
        • (s: string): string
        • Parameters

          • s: string

          Returns string

    • Optional options: CompilerOptions

    Returns ModuleResolutionCache

Const createNamedExports

  • deprecated

    Use factory.createNamedExports or the factory supplied by your transformation context instead.

    Parameters

    Returns NamedExports

Const createNamedImports

  • deprecated

    Use factory.createNamedImports or the factory supplied by your transformation context instead.

    Parameters

    Returns NamedImports

Const createNamespaceExport

  • deprecated

    Use factory.createNamespaceExport or the factory supplied by your transformation context instead.

    Parameters

    Returns NamespaceExport

Const createNamespaceExportDeclaration

  • deprecated

    Use factory.createNamespaceExportDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns NamespaceExportDeclaration

Const createNamespaceImport

  • deprecated

    Use factory.createNamespaceImport or the factory supplied by your transformation context instead.

    Parameters

    Returns NamespaceImport

Const createNew

  • deprecated

    Use factory.createNewExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns NewExpression

Const createNoSubstitutionTemplateLiteral

  • deprecated

    Use factory.createNoSubstitutionTemplateLiteral or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • Optional rawText: string

    Returns NoSubstitutionTemplateLiteral

  • deprecated

    Use factory.createNoSubstitutionTemplateLiteral or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • rawText: string

    Returns NoSubstitutionTemplateLiteral

Const createNode

  • deprecated

    Use an appropriate factory method instead.

    Parameters

    • kind: SyntaxKind
    • Optional pos: any
    • Optional end: any

    Returns Node

Const createNodeArray

  • createNodeArray<T>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>
  • deprecated

    Use factory.createNodeArray or the factory supplied by your transformation context instead.

    Type parameters

    Parameters

    • Optional elements: readonly T[]
    • Optional hasTrailingComma: boolean

    Returns NodeArray<T>

Const createNonNullChain

  • deprecated

    Use factory.createNonNullChain or the factory supplied by your transformation context instead.

    Parameters

    Returns NonNullChain

Const createNonNullExpression

  • deprecated

    Use factory.createNonNullExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns NonNullExpression

Const createNotEmittedStatement

  • deprecated

    Use factory.createNotEmittedStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns NotEmittedStatement

Const createNull

  • deprecated

    Use factory.createNull or the factory supplied by your transformation context instead.

    Returns NullLiteral

Const createNumericLiteral

  • deprecated

    Use factory.createNumericLiteral or the factory supplied by your transformation context instead.

    Parameters

    • value: string | number
    • Optional numericLiteralFlags: TokenFlags

    Returns NumericLiteral

Const createObjectBindingPattern

  • deprecated

    Use factory.createObjectBindingPattern or the factory supplied by your transformation context instead.

    Parameters

    Returns ObjectBindingPattern

Const createObjectLiteral

  • deprecated

    Use factory.createObjectLiteralExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns ObjectLiteralExpression

Const createOmittedExpression

  • deprecated

    Use factory.createOmittedExpression or the factory supplied by your transformation context instead.

    Returns OmittedExpression

Const createOptimisticUniqueName

  • createOptimisticUniqueName(text: string): Identifier
  • deprecated

    Use factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic) or the factory supplied by your transformation context instead.

    Parameters

    • text: string

    Returns Identifier

Const createOptionalTypeNode

  • deprecated

    Use factory.createOptionalTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns OptionalTypeNode

Const createParameter

Const createParen

  • deprecated

    Use factory.createParenthesizedExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns ParenthesizedExpression

Const createParenthesizedType

  • deprecated

    Use factory.createParenthesizedType or the factory supplied by your transformation context instead.

    Parameters

    Returns ParenthesizedTypeNode

Const createPartiallyEmittedExpression

  • deprecated

    Use factory.createPartiallyEmittedExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns PartiallyEmittedExpression

Const createPostfix

  • deprecated

    Use factory.createPostfixUnaryExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns PostfixUnaryExpression

Const createPostfixIncrement

  • deprecated

    Use factory.createPostfixIncrement or the factory supplied by your transformation context instead.

    Parameters

    Returns PostfixUnaryExpression

Const createPrefix

  • deprecated

    Use factory.createPrefixExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns PrefixUnaryExpression

createPrinter

Const createPrivateIdentifier

  • deprecated

    Use factory.createPrivateIdentifier or the factory supplied by your transformation context instead.

    Parameters

    • text: string

    Returns PrivateIdentifier

createProgram

  • Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' that represent a compilation unit.

    Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.

    Parameters

    Returns Program

    A 'Program' object.

  • Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' that represent a compilation unit.

    Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.

    Parameters

    • rootNames: readonly string[]

      A set of root files.

    • options: CompilerOptions

      The compiler options which should be used.

    • Optional host: CompilerHost

      The host interacts with the underlying file system.

    • Optional oldProgram: Program

      Reuses an old program structure.

    • Optional configFileParsingDiagnostics: readonly Diagnostic[]

      error during config file parsing

    Returns Program

    A 'Program' object.

Const createProperty

Const createPropertyAccess

  • deprecated

    Use factory.createPropertyAccessExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns PropertyAccessExpression

Const createPropertyAccessChain

  • deprecated

    Use factory.createPropertyAccessChain or the factory supplied by your transformation context instead.

    Parameters

    Returns PropertyAccessChain

Const createPropertyAssignment

  • deprecated

    Use factory.createPropertyAssignment or the factory supplied by your transformation context instead.

    Parameters

    Returns PropertyAssignment

Const createPropertySignature

  • deprecated

    Use factory.createPropertySignature or the factory supplied by your transformation context instead.

    Parameters

    Returns PropertySignature

Const createQualifiedName

  • deprecated

    Use factory.createQualifiedName or the factory supplied by your transformation context instead.

    Parameters

    Returns QualifiedName

Const createRegularExpressionLiteral

  • deprecated

    Use factory.createRegularExpressionLiteral or the factory supplied by your transformation context instead.

    Parameters

    • text: string

    Returns RegularExpressionLiteral

Const createRestTypeNode

  • deprecated

    Use factory.createRestTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns RestTypeNode

Const createReturn

  • deprecated

    Use factory.createReturnStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ReturnStatement

createScanner

  • Parameters

    • languageVersion: ScriptTarget
    • skipTrivia: boolean
    • Optional languageVariant: LanguageVariant
    • Optional textInitial: string
    • Optional onError: ErrorCallback
    • Optional start: number
    • Optional length: number

    Returns Scanner

createSemanticDiagnosticsBuilderProgram

Const createSemicolonClassElement

  • deprecated

    Use factory.createSemicolonClassElement or the factory supplied by your transformation context instead.

    Returns SemicolonClassElement

Const createSetAccessor

Const createShorthandPropertyAssignment

  • deprecated

    Use factory.createShorthandPropertyAssignment or the factory supplied by your transformation context instead.

    Parameters

    Returns ShorthandPropertyAssignment

createSolutionBuilder

createSolutionBuilderHost

createSolutionBuilderWithWatch

createSolutionBuilderWithWatchHost

createSourceFile

  • Parameters

    • fileName: string
    • sourceText: string
    • languageVersion: ScriptTarget
    • Optional setParentNodes: boolean
    • Optional scriptKind: ScriptKind

    Returns SourceFile

createSourceMapSource

  • createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource
  • Create an external source map source file reference

    Parameters

    • fileName: string
    • text: string
    • Optional skipTrivia: (pos: number) => number
        • (pos: number): number
        • Parameters

          • pos: number

          Returns number

    Returns SourceMapSource

Const createSpread

  • deprecated

    Use factory.createSpreadExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns SpreadElement

Const createSpreadAssignment

  • deprecated

    Use factory.createSpreadAssignment or the factory supplied by your transformation context instead.

    Parameters

    Returns SpreadAssignment

Const createStatement

  • deprecated

    Use factory.createExpressionStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ExpressionStatement

Const createStrictEquality

  • deprecated

    Use factory.createStrictEquality or the factory supplied by your transformation context instead.

    Parameters

    Returns BinaryExpression

Const createStrictInequality

  • deprecated

    Use factory.createStrictInequality or the factory supplied by your transformation context instead.

    Parameters

    Returns BinaryExpression

Const createStringLiteral

  • createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral
  • createStringLiteral(text: string, isSingleQuote?: boolean, hasExtendedUnicodeEscape?: boolean): StringLiteral
  • deprecated

    Use factory.createStringLiteral or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • Optional isSingleQuote: boolean

    Returns StringLiteral

  • deprecated

    Use factory.createStringLiteral or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • Optional isSingleQuote: boolean
    • Optional hasExtendedUnicodeEscape: boolean

    Returns StringLiteral

Const createStringLiteralFromNode

  • deprecated

    Use factory.createStringLiteralFromNode or the factory supplied by your transformation context instead.

    Parameters

    Returns StringLiteral

Const createSubtract

  • deprecated

    Use factory.createSubtract or the factory supplied by your transformation context instead.

    Parameters

    Returns BinaryExpression

Const createSuper

  • deprecated

    Use factory.createSuper or the factory supplied by your transformation context instead.

    Returns SuperExpression

Const createSwitch

  • deprecated

    Use factory.createSwitchStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns SwitchStatement

Const createTaggedTemplate

  • deprecated

    Use factory.createTaggedTemplate or the factory supplied by your transformation context instead.

    Parameters

    Returns TaggedTemplateExpression

  • deprecated

    Use factory.createTaggedTemplate or the factory supplied by your transformation context instead.

    Parameters

    Returns TaggedTemplateExpression

Const createTempVariable

  • deprecated

    Use factory.createTempVariable or the factory supplied by your transformation context instead.

    Parameters

    Returns Identifier

Const createTemplateExpression

  • deprecated

    Use factory.createTemplateExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns TemplateExpression

Const createTemplateHead

  • deprecated

    Use factory.createTemplateHead or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • Optional rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateHead

  • deprecated

    Use factory.createTemplateHead or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateHead

Const createTemplateMiddle

  • deprecated

    Use factory.createTemplateMiddle or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • Optional rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateMiddle

  • deprecated

    Use factory.createTemplateMiddle or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateMiddle

Const createTemplateSpan

  • deprecated

    Use factory.createTemplateSpan or the factory supplied by your transformation context instead.

    Parameters

    Returns TemplateSpan

Const createTemplateTail

  • deprecated

    Use factory.createTemplateTail or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • Optional rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateTail

  • deprecated

    Use factory.createTemplateTail or the factory supplied by your transformation context instead.

    Parameters

    • text: string
    • rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateTail

createTextChangeRange

  • Parameters

    Returns TextChangeRange

createTextSpan

  • createTextSpan(start: number, length: number): TextSpan
  • Parameters

    • start: number
    • length: number

    Returns TextSpan

createTextSpanFromBounds

  • createTextSpanFromBounds(start: number, end: number): TextSpan
  • Parameters

    • start: number
    • end: number

    Returns TextSpan

Const createThis

  • deprecated

    Use factory.createThis or the factory supplied by your transformation context instead.

    Returns ThisExpression

Const createThisTypeNode

  • deprecated

    Use factory.createThisTypeNode or the factory supplied by your transformation context instead.

    Returns ThisTypeNode

Const createThrow

  • deprecated

    Use factory.createThrowStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ThrowStatement

Const createToken

  • createToken<TKind>(kind: TKind): Token<TKind>
  • deprecated

    Use factory.createToken or the factory supplied by your transformation context instead.

    Type parameters

    Parameters

    • kind: TKind

    Returns Token<TKind>

Const createTrue

  • deprecated

    Use factory.createTrue or the factory supplied by your transformation context instead.

    Returns TrueLiteral

Const createTry

  • deprecated

    Use factory.createTryStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns TryStatement

Const createTupleTypeNode

  • deprecated

    Use factory.createTupleTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TupleTypeNode

Const createTypeAliasDeclaration

Const createTypeAssertion

  • deprecated

    Use factory.createTypeAssertion or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeAssertion

Const createTypeLiteralNode

  • deprecated

    Use factory.createTypeLiteralNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeLiteralNode

Const createTypeOf

  • deprecated

    Use factory.createTypeOfExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeOfExpression

Const createTypeOperatorNode

  • deprecated

    Use factory.createTypeOperatorNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeOperatorNode

  • deprecated

    Use factory.createTypeOperatorNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeOperatorNode

Const createTypeParameterDeclaration

  • deprecated

    Use factory.createTypeParameterDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeParameterDeclaration

Const createTypePredicateNode

  • deprecated

    Use factory.createTypePredicateNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypePredicateNode

Const createTypePredicateNodeWithModifier

  • deprecated

    Use factory.createTypePredicateNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypePredicateNode

Const createTypeQueryNode

  • deprecated

    Use factory.createTypeQueryNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeQueryNode

createTypeReferenceDirectiveResolutionCache

Const createTypeReferenceNode

  • deprecated

    Use factory.createTypeReferenceNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeReferenceNode

Const createUnionTypeNode

  • deprecated

    Use factory.createUnionTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns UnionTypeNode

Const createUniqueName

  • deprecated

    Use factory.createUniqueName or the factory supplied by your transformation context instead.

    Parameters

    Returns Identifier

createUnparsedSourceFile

  • createUnparsedSourceFile(text: string): UnparsedSource
  • createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource
  • createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource
  • Parameters

    • text: string

    Returns UnparsedSource

  • Parameters

    • inputFile: InputFiles
    • type: "js" | "dts"
    • Optional stripInternal: boolean

    Returns UnparsedSource

  • Parameters

    • text: string
    • mapPath: string | undefined
    • map: string | undefined

    Returns UnparsedSource

Const createVariableDeclaration

  • deprecated

    Use factory.createVariableDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns VariableDeclaration

  • deprecated

    Use factory.createVariableDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns VariableDeclaration

Const createVariableDeclarationList

  • deprecated

    Use factory.createVariableDeclarationList or the factory supplied by your transformation context instead.

    Parameters

    Returns VariableDeclarationList

Const createVariableStatement

Const createVoid

  • deprecated

    Use factory.createVoidExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns VoidExpression

Const createVoidZero

  • deprecated

    Use factory.createVoidZero or the factory supplied by your transformation context instead.

    Returns VoidExpression

createWatchCompilerHost

createWatchProgram

Const createWhile

  • deprecated

    Use factory.createWhileStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns WhileStatement

Const createWith

  • deprecated

    Use factory.createWithStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns WithStatement

Const createYield

  • deprecated

    Use factory.createYield or the factory supplied by your transformation context instead.

    Parameters

    Returns YieldExpression

  • deprecated

    Use factory.createYield or the factory supplied by your transformation context instead.

    Parameters

    Returns YieldExpression

decodedTextSpanIntersectsWith

  • decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean
  • Parameters

    • start1: number
    • length1: number
    • start2: number
    • length2: number

    Returns boolean

displayPartsToString

  • Parameters

    Returns string

disposeEmitNodes

  • disposeEmitNodes(sourceFile: SourceFile | undefined): void
  • Clears any EmitNode entries from parse-tree nodes.

    Parameters

    • sourceFile: SourceFile | undefined

      A source file.

    Returns void

escapeLeadingUnderscores

  • escapeLeadingUnderscores(identifier: string): __String
  • Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like 'proto'

    Parameters

    • identifier: string

    Returns __String

findAncestor

  • findAncestor<T>(node: Node | undefined, callback: (element: Node) => element is T): T | undefined
  • findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined
  • 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.

    Type parameters

    Parameters

    • node: Node | undefined
    • callback: (element: Node) => element is T
        • (element: Node): element is T
        • Parameters

          Returns element is T

    Returns T | undefined

  • Parameters

    • node: Node | undefined
    • callback: (element: Node) => boolean | "quit"
        • (element: Node): boolean | "quit"
        • Parameters

          Returns boolean | "quit"

    Returns Node | undefined

findConfigFile

  • findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined
  • Parameters

    • searchPath: string
    • fileExists: (fileName: string) => boolean
        • (fileName: string): boolean
        • Parameters

          • fileName: string

          Returns boolean

    • Optional configName: string

    Returns string | undefined

flattenDiagnosticMessageText

  • flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string
  • Parameters

    Returns string

forEachChild

  • forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined
  • Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.

    remarks

    forEachChild must visit the children of a node in the order that they appear in the source code. The language service depends on this property to locate nodes by position.

    Type parameters

    • T

    Parameters

    • node: Node

      a given node to visit its children

    • cbNode: (node: Node) => T | undefined

      a callback to be invoked for all child nodes

        • (node: Node): T | undefined
        • Parameters

          Returns T | undefined

    • Optional cbNodes: (nodes: NodeArray<Node>) => T | undefined

      a callback to be invoked for embedded array

    Returns T | undefined

forEachLeadingCommentRange

  • forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined
  • forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined
  • Type parameters

    • U

    Parameters

    • text: string
    • pos: number
    • cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U
        • (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean): U
        • Parameters

          • pos: number
          • end: number
          • kind: CommentKind
          • hasTrailingNewLine: boolean

          Returns U

    Returns U | undefined

  • Type parameters

    • T

    • U

    Parameters

    • text: string
    • pos: number
    • cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U
        • (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T): U
        • Parameters

          • pos: number
          • end: number
          • kind: CommentKind
          • hasTrailingNewLine: boolean
          • state: T

          Returns U

    • state: T

    Returns U | undefined

forEachTrailingCommentRange

  • forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined
  • forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined
  • Type parameters

    • U

    Parameters

    • text: string
    • pos: number
    • cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U
        • (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean): U
        • Parameters

          • pos: number
          • end: number
          • kind: CommentKind
          • hasTrailingNewLine: boolean

          Returns U

    Returns U | undefined

  • Type parameters

    • T

    • U

    Parameters

    • text: string
    • pos: number
    • cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U
        • (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T): U
        • Parameters

          • pos: number
          • end: number
          • kind: CommentKind
          • hasTrailingNewLine: boolean
          • state: T

          Returns U

    • state: T

    Returns U | undefined

formatDiagnostic

formatDiagnostics

formatDiagnosticsWithColorAndContext

getAllJSDocTags

  • getAllJSDocTags<T>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]
  • Gets all JSDoc tags that match a specified predicate

    Type parameters

    Parameters

    Returns readonly T[]

getAllJSDocTagsOfKind

  • Gets all JSDoc tags of a specified kind

    Parameters

    Returns readonly JSDocTag[]

getAutomaticTypeDirectiveNames

  • Given a set of options, returns the set of type directive names that should be included for this program automatically. This list could either come from the config file, or from enumerating the types root + initial secondary types lookup location. More type directives might appear in the program later as a result of loading actual source files; this list is only the set of defaults that are implicitly included.

    Parameters

    Returns string[]

getCombinedModifierFlags

getCombinedNodeFlags

  • Parameters

    Returns NodeFlags

getCommentRange

  • Gets a custom text range to use when emitting comments.

    Parameters

    Returns TextRange

getConfigFileParsingDiagnostics

  • Parameters

    Returns readonly Diagnostic[]

getConstantValue

  • Gets the constant value to emit for an expression representing an enum.

    Parameters

    Returns string | number | undefined

getDefaultCompilerOptions

  • Returns CompilerOptions

getDefaultFormatCodeSettings

  • Parameters

    • Optional newLineCharacter: string

    Returns FormatCodeSettings

getDefaultLibFileName

  • Parameters

    Returns string

getDefaultLibFilePath

  • Get the path of the default library files (lib.d.ts) as distributed with the typescript node package. The functionality is not supported if the ts module is consumed outside of a node module.

    Parameters

    Returns string

getEffectiveConstraintOfTypeParameter

getEffectiveTypeParameterDeclarations

  • Gets the effective type parameters. If the node was parsed in a JavaScript file, gets the type parameters from the @template tag from JSDoc.

    Parameters

    Returns readonly TypeParameterDeclaration[]

getEffectiveTypeRoots

getEmitHelpers

  • Gets the EmitHelpers of a node.

    Parameters

    Returns EmitHelper[] | undefined

Const getGeneratedNameForNode

  • deprecated

    Use factory.getGeneratedNameForNode or the factory supplied by your transformation context instead.

    Parameters

    Returns Identifier

getJSDocAugmentsTag

  • Gets the JSDoc augments tag for the node if present

    Parameters

    Returns JSDocAugmentsTag | undefined

getJSDocClassTag

  • Gets the JSDoc class tag for the node if present

    Parameters

    Returns JSDocClassTag | undefined

getJSDocDeprecatedTag

  • Gets the JSDoc deprecated tag for the node if present

    Parameters

    Returns JSDocDeprecatedTag | undefined

getJSDocEnumTag

  • Gets the JSDoc enum tag for the node if present

    Parameters

    Returns JSDocEnumTag | undefined

getJSDocImplementsTags

  • Gets the JSDoc implements tags for the node if present

    Parameters

    Returns readonly JSDocImplementsTag[]

getJSDocOverrideTagNoCache

  • Parameters

    Returns JSDocOverrideTag | undefined

getJSDocParameterTags

  • Gets the JSDoc parameter tags for the node if present.

    remarks

    Returns any JSDoc param tag whose name matches the provided parameter, whether a param tag on a containing function expression, or a param tag on a variable declaration whose initializer is the containing function. The tags closest to the node are returned first, so in the previous example, the param tag on the containing function expression would be first.

    For binding patterns, parameter tags are matched by position.

    Parameters

    Returns readonly JSDocParameterTag[]

getJSDocPrivateTag

  • Gets the JSDoc private tag for the node if present

    Parameters

    Returns JSDocPrivateTag | undefined

getJSDocProtectedTag

  • Gets the JSDoc protected tag for the node if present

    Parameters

    Returns JSDocProtectedTag | undefined

getJSDocPublicTag

  • Gets the JSDoc public tag for the node if present

    Parameters

    Returns JSDocPublicTag | undefined

getJSDocReadonlyTag

  • Gets the JSDoc protected tag for the node if present

    Parameters

    Returns JSDocReadonlyTag | undefined

getJSDocReturnTag

  • Gets the JSDoc return tag for the node if present

    Parameters

    Returns JSDocReturnTag | undefined

getJSDocReturnType

  • Gets the return type node for the node if provided via JSDoc return tag or type tag.

    remarks

    getJSDocReturnTag just gets the whole JSDoc tag. This function gets the type from inside the braces, after the fat arrow, etc.

    Parameters

    Returns TypeNode | undefined

getJSDocTags

  • Get all JSDoc tags related to a node, including those on parent nodes.

    Parameters

    Returns readonly JSDocTag[]

getJSDocTemplateTag

  • Gets the JSDoc template tag for the node if present

    Parameters

    Returns JSDocTemplateTag | undefined

getJSDocThisTag

  • Gets the JSDoc this tag for the node if present

    Parameters

    Returns JSDocThisTag | undefined

getJSDocType

  • Gets the type node for the node if provided via JSDoc.

    remarks

    The search includes any JSDoc param tag that relates to the provided parameter, for example a type tag on the parameter itself, or a param tag on a containing function expression, or a param tag on a variable declaration whose initializer is the containing function. The tags closest to the node are examined first, so in the previous example, the type tag directly on the node would be returned.

    Parameters

    Returns TypeNode | undefined

getJSDocTypeParameterTags

  • Gets the JSDoc type parameter tags for the node if present.

    remarks

    Returns any JSDoc template tag whose names match the provided parameter, whether a template tag on a containing function expression, or a template tag on a variable declaration whose initializer is the containing function. The tags closest to the node are returned first, so in the previous example, the template tag on the containing function expression would be first.

    Parameters

    Returns readonly JSDocTemplateTag[]

getJSDocTypeTag

  • Gets the JSDoc type tag for the node if present and valid

    Parameters

    Returns JSDocTypeTag | undefined

getLeadingCommentRanges

  • getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined
  • Parameters

    • text: string
    • pos: number

    Returns CommentRange[] | undefined

getLineAndCharacterOfPosition

Const getMutableClone

  • getMutableClone<T>(node: T): T
  • Creates a shallow, memberwise clone of a node for mutation with its pos, end, and parent set.

    NOTE: It is unsafe to change any properties of a Node that relate to its AST children, as those changes won't be captured with respect to transformations.

    deprecated

    Use an appropriate factory.update... method instead, use setCommentRange or setSourceMapRange, and avoid setting parent.

    Type parameters

    Parameters

    • node: T

    Returns T

getNameOfDeclaration

getNameOfJSDocTypedef

getNodeMajorVersion

  • getNodeMajorVersion(): number | undefined
  • Returns number | undefined

getOriginalNode

  • getOriginalNode(node: Node): Node
  • getOriginalNode<T>(node: Node, nodeTest: (node: Node) => node is T): T
  • getOriginalNode(node: Node | undefined): Node | undefined
  • getOriginalNode<T>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined
  • Parameters

    Returns Node

  • Type parameters

    Parameters

    • node: Node
    • nodeTest: (node: Node) => node is T
        • (node: Node): node is T
        • Parameters

          Returns node is T

    Returns T

  • Parameters

    • node: Node | undefined

    Returns Node | undefined

  • Type parameters

    Parameters

    • node: Node | undefined
    • nodeTest: (node: Node | undefined) => node is T
        • (node: Node | undefined): node is T
        • Parameters

          • node: Node | undefined

          Returns node is T

    Returns T | undefined

getOutputFileNames

  • getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]
  • Parameters

    Returns readonly string[]

getParseTreeNode

  • getParseTreeNode(node: Node | undefined): Node | undefined
  • getParseTreeNode<T>(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined
  • Gets the original parse tree node for a node.

    Parameters

    • node: Node | undefined

      The original node.

    Returns Node | undefined

    The original parse tree node if found; otherwise, undefined.

  • Gets the original parse tree node for a node.

    Type parameters

    Parameters

    • node: T | undefined

      The original node.

    • Optional nodeTest: (node: Node) => node is T

      A callback used to ensure the correct type of parse tree node is returned.

        • (node: Node): node is T
        • Parameters

          Returns node is T

    Returns T | undefined

    The original parse tree node if found; otherwise, undefined.

getParsedCommandLineOfConfigFile

getPositionOfLineAndCharacter

  • getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number
  • Parameters

    Returns number

getPreEmitDiagnostics

getShebang

  • getShebang(text: string): string | undefined
  • Optionally, get the shebang

    Parameters

    • text: string

    Returns string | undefined

getSourceMapRange

  • Gets a custom text range to use when emitting source maps.

    Parameters

    Returns SourceMapRange

getSupportedCodeFixes

  • getSupportedCodeFixes(): string[]
  • Returns string[]

getSyntheticLeadingComments

  • Parameters

    Returns SynthesizedComment[] | undefined

getSyntheticTrailingComments

  • Parameters

    Returns SynthesizedComment[] | undefined

getTextOfJSDocComment

  • Gets the text of a jsdoc comment, flattening links to their text.

    Parameters

    Returns string | undefined

getTokenSourceMapRange

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

    Parameters

    Returns SourceMapRange | undefined

getTrailingCommentRanges

  • getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined
  • Parameters

    • text: string
    • pos: number

    Returns CommentRange[] | undefined

getTsBuildInfoEmitOutputFilePath

  • getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined
  • Parameters

    Returns string | undefined

getTypeParameterOwner

  • Parameters

    Returns Declaration | undefined

hasJSDocParameterTags

  • Return true if the node has JSDoc parameter tags.

    remarks

    Includes parameter tags that are not directly on the node, for example on a variable declaration whose initializer is a function expression.

    Parameters

    Returns boolean

hasOnlyExpressionInitializer

  • True if has initializer node attached to it.

    Parameters

    Returns node is HasExpressionInitializer

idText

  • Parameters

    Returns string

isAccessor

  • Parameters

    Returns node is AccessorDeclaration

isArrayBindingPattern

  • Parameters

    Returns node is ArrayBindingPattern

isArrayLiteralExpression

isArrayTypeNode

  • Parameters

    Returns node is ArrayTypeNode

isArrowFunction

  • Parameters

    Returns node is ArrowFunction

isAsExpression

  • Parameters

    Returns node is AsExpression

isAssertionExpression

  • Parameters

    Returns node is AssertionExpression

isAsteriskToken

  • Parameters

    Returns node is AsteriskToken

isAwaitExpression

  • Parameters

    Returns node is AwaitExpression

isBigIntLiteral

  • Parameters

    Returns node is BigIntLiteral

isBinaryExpression

  • Parameters

    Returns node is BinaryExpression

isBindingElement

  • Parameters

    Returns node is BindingElement

isBindingName

  • Parameters

    Returns node is BindingName

isBlock

  • Parameters

    Returns node is Block

isBreakOrContinueStatement

isBreakStatement

  • Parameters

    Returns node is BreakStatement

isBundle

  • Parameters

    Returns node is Bundle

isCallChain

  • Parameters

    Returns node is CallChain

isCallExpression

  • Parameters

    Returns node is CallExpression

isCallLikeExpression

  • Parameters

    Returns node is CallLikeExpression

isCallOrNewExpression

isCallSignatureDeclaration

isCaseBlock

  • Parameters

    Returns node is CaseBlock

isCaseClause

  • Parameters

    Returns node is CaseClause

isCaseOrDefaultClause

  • Parameters

    Returns node is CaseOrDefaultClause

isCatchClause

  • Parameters

    Returns node is CatchClause

isClassDeclaration

  • Parameters

    Returns node is ClassDeclaration

isClassElement

  • Parameters

    Returns node is ClassElement

isClassExpression

  • Parameters

    Returns node is ClassExpression

isClassLike

  • Parameters

    Returns node is ClassLikeDeclaration

isClassOrTypeElement

isCommaListExpression

  • Parameters

    Returns node is CommaListExpression

isComputedPropertyName

  • Parameters

    Returns node is ComputedPropertyName

isConditionalExpression

isConditionalTypeNode

  • Parameters

    Returns node is ConditionalTypeNode

isConstTypeReference

  • isConstTypeReference(node: Node): boolean
  • Parameters

    Returns boolean

isConstructSignatureDeclaration

isConstructorDeclaration

isConstructorTypeNode

  • Parameters

    Returns node is ConstructorTypeNode

isContinueStatement

  • Parameters

    Returns node is ContinueStatement

isDebuggerStatement

  • Parameters

    Returns node is DebuggerStatement

isDecorator

  • Parameters

    Returns node is Decorator

isDefaultClause

  • Parameters

    Returns node is DefaultClause

isDeleteExpression

  • Parameters

    Returns node is DeleteExpression

isDoStatement

  • Parameters

    Returns node is DoStatement

isDotDotDotToken

  • Parameters

    Returns node is DotDotDotToken

isElementAccessChain

  • Parameters

    Returns node is ElementAccessChain

isElementAccessExpression

isEmptyBindingElement

  • Parameters

    Returns boolean

isEmptyBindingPattern

isEmptyStatement

  • Parameters

    Returns node is EmptyStatement

isEntityName

  • Parameters

    Returns node is EntityName

isEnumDeclaration

  • Parameters

    Returns node is EnumDeclaration

isEnumMember

  • Parameters

    Returns node is EnumMember

isExportAssignment

  • Parameters

    Returns node is ExportAssignment

isExportDeclaration

  • Parameters

    Returns node is ExportDeclaration

isExportSpecifier

  • Parameters

    Returns node is ExportSpecifier

isExpressionStatement

  • Parameters

    Returns node is ExpressionStatement

isExpressionWithTypeArguments

isExternalModule

  • Parameters

    Returns boolean

isExternalModuleNameRelative

  • isExternalModuleNameRelative(moduleName: string): boolean
  • Parameters

    • moduleName: string

    Returns boolean

isExternalModuleReference

isForInStatement

  • Parameters

    Returns node is ForInStatement

isForOfStatement

  • Parameters

    Returns node is ForOfStatement

isForStatement

  • Parameters

    Returns node is ForStatement

isFunctionDeclaration

  • Parameters

    Returns node is FunctionDeclaration

isFunctionExpression

  • Parameters

    Returns node is FunctionExpression

isFunctionLike

  • Parameters

    • node: Node | undefined

    Returns node is SignatureDeclaration

isFunctionOrConstructorTypeNode

isFunctionTypeNode

  • Parameters

    Returns node is FunctionTypeNode

isGetAccessor

isGetAccessorDeclaration

isHeritageClause

  • Parameters

    Returns node is HeritageClause

isIdentifier

  • Parameters

    Returns node is Identifier

Const isIdentifierOrPrivateIdentifier

  • deprecated

    Use isMemberName instead.

    Parameters

    Returns node is MemberName

isIdentifierPart

  • Parameters

    Returns boolean

isIdentifierStart

  • isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean
  • Parameters

    Returns boolean

isIfStatement

  • Parameters

    Returns node is IfStatement

isImportClause

  • Parameters

    Returns node is ImportClause

isImportDeclaration

  • Parameters

    Returns node is ImportDeclaration

isImportEqualsDeclaration

isImportOrExportSpecifier

isImportSpecifier

  • Parameters

    Returns node is ImportSpecifier

isImportTypeNode

  • Parameters

    Returns node is ImportTypeNode

isIndexSignatureDeclaration

isIndexedAccessTypeNode

isInferTypeNode

  • Parameters

    Returns node is InferTypeNode

isInterfaceDeclaration

  • Parameters

    Returns node is InterfaceDeclaration

isIntersectionTypeNode

  • Parameters

    Returns node is IntersectionTypeNode

isIterationStatement

  • Parameters

    • node: Node
    • lookInLabeledStatements: false

    Returns node is IterationStatement

  • Parameters

    • node: Node
    • lookInLabeledStatements: boolean

    Returns node is IterationStatement | LabeledStatement

isJSDoc

  • Parameters

    Returns node is JSDoc

isJSDocAllType

  • Parameters

    Returns node is JSDocAllType

isJSDocAugmentsTag

  • Parameters

    Returns node is JSDocAugmentsTag

isJSDocAuthorTag

  • Parameters

    Returns node is JSDocAuthorTag

isJSDocCallbackTag

  • Parameters

    Returns node is JSDocCallbackTag

isJSDocClassTag

  • Parameters

    Returns node is JSDocClassTag

isJSDocCommentContainingNode

  • isJSDocCommentContainingNode(node: Node): boolean
  • True if node is of a kind that may contain comment text.

    Parameters

    Returns boolean

isJSDocDeprecatedTag

  • Parameters

    Returns node is JSDocDeprecatedTag

isJSDocEnumTag

  • Parameters

    Returns node is JSDocEnumTag

isJSDocFunctionType

  • Parameters

    Returns node is JSDocFunctionType

isJSDocImplementsTag

  • Parameters

    Returns node is JSDocImplementsTag

isJSDocLink

  • Parameters

    Returns node is JSDocLink

isJSDocNameReference

  • Parameters

    Returns node is JSDocNameReference

isJSDocNamepathType

  • Parameters

    Returns node is JSDocNamepathType

isJSDocNonNullableType

  • Parameters

    Returns node is JSDocNonNullableType

isJSDocNullableType

  • Parameters

    Returns node is JSDocNullableType

isJSDocOptionalType

  • Parameters

    Returns node is JSDocOptionalType

isJSDocOverrideTag

  • Parameters

    Returns node is JSDocOverrideTag

isJSDocParameterTag

  • Parameters

    Returns node is JSDocParameterTag

isJSDocPrivateTag

  • Parameters

    Returns node is JSDocPrivateTag

isJSDocPropertyLikeTag

  • Parameters

    Returns node is JSDocPropertyLikeTag

isJSDocPropertyTag

  • Parameters

    Returns node is JSDocPropertyTag

isJSDocProtectedTag

  • Parameters

    Returns node is JSDocProtectedTag

isJSDocPublicTag

  • Parameters

    Returns node is JSDocPublicTag

isJSDocReadonlyTag

  • Parameters

    Returns node is JSDocReadonlyTag

isJSDocReturnTag

  • Parameters

    Returns node is JSDocReturnTag

isJSDocSeeTag

  • Parameters

    Returns node is JSDocSeeTag

isJSDocSignature

  • Parameters

    Returns node is JSDocSignature

isJSDocTemplateTag

  • Parameters

    Returns node is JSDocTemplateTag

isJSDocThisTag

  • Parameters

    Returns node is JSDocThisTag

isJSDocTypeExpression

  • Parameters

    Returns node is JSDocTypeExpression

isJSDocTypeLiteral

  • Parameters

    Returns node is JSDocTypeLiteral

isJSDocTypeTag

  • Parameters

    Returns node is JSDocTypeTag

isJSDocTypedefTag

  • Parameters

    Returns node is JSDocTypedefTag

isJSDocUnknownTag

  • Parameters

    Returns node is JSDocUnknownTag

isJSDocUnknownType

  • Parameters

    Returns node is JSDocUnknownType

isJSDocVariadicType

  • Parameters

    Returns node is JSDocVariadicType

isJsxAttribute

  • Parameters

    Returns node is JsxAttribute

isJsxAttributes

  • Parameters

    Returns node is JsxAttributes

isJsxClosingElement

  • Parameters

    Returns node is JsxClosingElement

isJsxClosingFragment

  • Parameters

    Returns node is JsxClosingFragment

isJsxElement

  • Parameters

    Returns node is JsxElement

isJsxExpression

  • Parameters

    Returns node is JsxExpression

isJsxFragment

  • Parameters

    Returns node is JsxFragment

isJsxOpeningElement

  • Parameters

    Returns node is JsxOpeningElement

isJsxOpeningFragment

  • Parameters

    Returns node is JsxOpeningFragment

isJsxOpeningLikeElement

isJsxSelfClosingElement

isJsxSpreadAttribute

  • Parameters

    Returns node is JsxSpreadAttribute

isJsxText

  • Parameters

    Returns node is JsxText

isLabeledStatement

  • Parameters

    Returns node is LabeledStatement

isLineBreak

  • isLineBreak(ch: number): boolean
  • Parameters

    • ch: number

    Returns boolean

isLiteralExpression

  • Parameters

    Returns node is LiteralExpression

isLiteralTypeNode

  • Parameters

    Returns node is LiteralTypeNode

isMappedTypeNode

  • Parameters

    Returns node is MappedTypeNode

isMemberName

  • Parameters

    Returns node is MemberName

isMetaProperty

  • Parameters

    Returns node is MetaProperty

isMethodDeclaration

  • Parameters

    Returns node is MethodDeclaration

isMethodSignature

  • Parameters

    Returns node is MethodSignature

isMinusToken

  • Parameters

    Returns node is MinusToken

isMissingDeclaration

  • Parameters

    Returns node is MissingDeclaration

isModifier

  • Parameters

    Returns node is Modifier

isModuleBlock

  • Parameters

    Returns node is ModuleBlock

isModuleDeclaration

  • Parameters

    Returns node is ModuleDeclaration

isNamedExportBindings

  • Parameters

    Returns node is NamedExportBindings

isNamedExports

  • Parameters

    Returns node is NamedExports

isNamedImports

  • Parameters

    Returns node is NamedImports

isNamedTupleMember

  • Parameters

    Returns node is NamedTupleMember

isNamespaceExport

  • Parameters

    Returns node is NamespaceExport

isNamespaceExportDeclaration

isNamespaceImport

  • Parameters

    Returns node is NamespaceImport

isNewExpression

  • Parameters

    Returns node is NewExpression

isNoSubstitutionTemplateLiteral

isNonNullChain

  • Parameters

    Returns node is NonNullChain

isNonNullExpression

  • Parameters

    Returns node is NonNullExpression

isNotEmittedStatement

  • Parameters

    Returns node is NotEmittedStatement

isNullishCoalesce

  • isNullishCoalesce(node: Node): boolean
  • Parameters

    Returns boolean

isNumericLiteral

  • Parameters

    Returns node is NumericLiteral

isObjectBindingPattern

  • Parameters

    Returns node is ObjectBindingPattern

isObjectLiteralElement

  • Parameters

    Returns node is ObjectLiteralElement

isObjectLiteralElementLike

isObjectLiteralExpression

isOmittedExpression

  • Parameters

    Returns node is OmittedExpression

isOptionalChain

isOptionalTypeNode

  • Parameters

    Returns node is OptionalTypeNode

isParameter

  • Parameters

    Returns node is ParameterDeclaration

isParameterPropertyDeclaration

isParenthesizedExpression

isParenthesizedTypeNode

isParseTreeNode

  • isParseTreeNode(node: Node): boolean
  • Gets a value indicating whether a node originated in the parse tree.

    Parameters

    • node: Node

      The node to test.

    Returns boolean

isPartiallyEmittedExpression

isPlusToken

  • Parameters

    Returns node is PlusToken

isPostfixUnaryExpression

isPrefixUnaryExpression

isPrivateIdentifier

  • Parameters

    Returns node is PrivateIdentifier

isPropertyAccessChain

  • Parameters

    Returns node is PropertyAccessChain

isPropertyAccessExpression

isPropertyAccessOrQualifiedName

isPropertyAssignment

  • Parameters

    Returns node is PropertyAssignment

isPropertyDeclaration

  • Parameters

    Returns node is PropertyDeclaration

isPropertyName

  • Parameters

    Returns node is PropertyName

isPropertySignature

  • Parameters

    Returns node is PropertySignature

isQualifiedName

  • Parameters

    Returns node is QualifiedName

isRegularExpressionLiteral

isRestTypeNode

  • Parameters

    Returns node is RestTypeNode

isReturnStatement

  • Parameters

    Returns node is ReturnStatement

isSemicolonClassElement

isSetAccessor

isSetAccessorDeclaration

isShorthandPropertyAssignment

isSourceFile

  • Parameters

    Returns node is SourceFile

isSpreadAssignment

  • Parameters

    Returns node is SpreadAssignment

isSpreadElement

  • Parameters

    Returns node is SpreadElement

isStringLiteral

  • Parameters

    Returns node is StringLiteral

isStringLiteralLike

  • Parameters

    Returns node is StringLiteralLike

isStringTextContainingNode

isSwitchStatement

  • Parameters

    Returns node is SwitchStatement

isSyntheticExpression

  • Parameters

    Returns node is SyntheticExpression

isTaggedTemplateExpression

isTemplateExpression

  • Parameters

    Returns node is TemplateExpression

isTemplateHead

  • Parameters

    Returns node is TemplateHead

isTemplateLiteral

  • Parameters

    Returns node is TemplateLiteral

isTemplateLiteralToken

  • Parameters

    Returns node is TemplateLiteralToken

isTemplateLiteralTypeNode

isTemplateLiteralTypeSpan

isTemplateMiddle

  • Parameters

    Returns node is TemplateMiddle

isTemplateMiddleOrTemplateTail

isTemplateSpan

  • Parameters

    Returns node is TemplateSpan

isTemplateTail

  • Parameters

    Returns node is TemplateTail

isThisTypeNode

  • Parameters

    Returns node is ThisTypeNode

isThrowStatement

  • Parameters

    Returns node is ThrowStatement

isToken

  • isToken(n: Node): boolean
  • True if node is of some token syntax kind. For example, this is true for an IfKeyword but not for an IfStatement. Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.

    Parameters

    Returns boolean

isTokenKind

  • True if kind is of some token syntax kind. For example, this is true for an IfKeyword but not for an IfStatement. Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.

    Parameters

    Returns boolean

isTryStatement

  • Parameters

    Returns node is TryStatement

isTupleTypeNode

  • Parameters

    Returns node is TupleTypeNode

isTypeAliasDeclaration

  • Parameters

    Returns node is TypeAliasDeclaration

Const isTypeAssertion

  • deprecated

    Use isTypeAssertionExpression instead.

    Parameters

    Returns node is TypeAssertion

isTypeAssertionExpression

  • Parameters

    Returns node is TypeAssertion

isTypeElement

  • Parameters

    Returns node is TypeElement

isTypeLiteralNode

  • Parameters

    Returns node is TypeLiteralNode

isTypeNode

  • Node test that determines whether a node is a valid type node. This differs from the isPartOfTypeNode function which determines whether a node is part of a TypeNode.

    Parameters

    Returns node is TypeNode

isTypeOfExpression

  • Parameters

    Returns node is TypeOfExpression

isTypeOnlyImportOrExportDeclaration

isTypeOperatorNode

  • Parameters

    Returns node is TypeOperatorNode

isTypeParameterDeclaration

isTypePredicateNode

  • Parameters

    Returns node is TypePredicateNode

isTypeQueryNode

  • Parameters

    Returns node is TypeQueryNode

isTypeReferenceNode

  • Parameters

    Returns node is TypeReferenceNode

isUnionTypeNode

  • Parameters

    Returns node is UnionTypeNode

isUnparsedNode

  • Parameters

    Returns node is UnparsedNode

isUnparsedPrepend

  • Parameters

    Returns node is UnparsedPrepend

isUnparsedSource

  • Parameters

    Returns node is UnparsedSource

isUnparsedTextLike

  • Parameters

    Returns node is UnparsedTextLike

isVariableDeclaration

  • Parameters

    Returns node is VariableDeclaration

isVariableDeclarationList

isVariableStatement

  • Parameters

    Returns node is VariableStatement

isVoidExpression

  • Parameters

    Returns node is VoidExpression

isWhileStatement

  • Parameters

    Returns node is WhileStatement

isWhiteSpaceLike

  • isWhiteSpaceLike(ch: number): boolean
  • Parameters

    • ch: number

    Returns boolean

isWhiteSpaceSingleLine

  • isWhiteSpaceSingleLine(ch: number): boolean
  • Does not include line breaks. For that, see isWhiteSpaceLike.

    Parameters

    • ch: number

    Returns boolean

isWithStatement

  • Parameters

    Returns node is WithStatement

isYieldExpression

  • Parameters

    Returns node is YieldExpression

moveEmitHelpers

  • moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void
  • Moves matching emit helpers from a source node to a target node.

    Parameters

    Returns void

moveSyntheticComments

  • moveSyntheticComments<T>(node: T, original: Node): T
  • Type parameters

    Parameters

    • node: T
    • original: Node

    Returns T

nodeModuleNameResolver

parseCommandLine

  • parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine
  • Parameters

    • commandLine: readonly string[]
    • Optional readFile: (path: string) => string | undefined
        • (path: string): string | undefined
        • Parameters

          • path: string

          Returns string | undefined

    Returns ParsedCommandLine

parseConfigFileTextToJson

  • parseConfigFileTextToJson(fileName: string, jsonText: string): { config?: any; error?: Diagnostic }
  • Parse the text of the tsconfig.json file

    Parameters

    • fileName: string

      The path to the config file

    • jsonText: string

      The text of the config file

    Returns { config?: any; error?: Diagnostic }

    • Optional config?: any
    • Optional error?: Diagnostic

parseIsolatedEntityName

  • Parameters

    Returns EntityName | undefined

parseJsonConfigFileContent

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

    Parameters

    • json: any

      The contents of the config file to parse

    • host: ParseConfigHost

      Instance of ParseConfigHost used to enumerate files in folder.

    • basePath: string

      A root directory to resolve relative path entries in the config file to. e.g. outDir

    • Optional existingOptions: CompilerOptions
    • Optional configFileName: string
    • Optional resolutionStack: Path[]
    • Optional extraFileExtensions: readonly FileExtensionInfo[]
    • Optional extendedConfigCache: Map<ExtendedConfigCacheEntry>
    • Optional existingWatchOptions: WatchOptions

    Returns ParsedCommandLine

parseJsonSourceFileConfigFileContent

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

    Parameters

    Returns ParsedCommandLine

parseJsonText

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

    Parameters

    • fileName: string
    • sourceText: string

    Returns JsonSourceFile

preProcessFile

  • preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo
  • Parameters

    • sourceText: string
    • Optional readImportFiles: boolean
    • Optional detectJavaScriptImports: boolean

    Returns PreProcessedFileInfo

readBuilderProgram

readConfigFile

  • readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { config?: any; error?: Diagnostic }
  • Read tsconfig.json file

    Parameters

    • fileName: string

      The path to the config file

    • readFile: (path: string) => string | undefined
        • (path: string): string | undefined
        • Parameters

          • path: string

          Returns string | undefined

    Returns { config?: any; error?: Diagnostic }

    • Optional config?: any
    • Optional error?: Diagnostic

readJsonConfigFile

  • readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile
  • Read tsconfig.json file

    Parameters

    • fileName: string

      The path to the config file

    • readFile: (path: string) => string | undefined
        • (path: string): string | undefined
        • Parameters

          • path: string

          Returns string | undefined

    Returns TsConfigSourceFile

reduceEachLeadingCommentRange

  • reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined
  • Type parameters

    • T

    • U

    Parameters

    • text: string
    • pos: number
    • cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U
        • (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U): U
        • Parameters

          • pos: number
          • end: number
          • kind: CommentKind
          • hasTrailingNewLine: boolean
          • state: T
          • memo: U

          Returns U

    • state: T
    • initial: U

    Returns U | undefined

reduceEachTrailingCommentRange

  • reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined
  • Type parameters

    • T

    • U

    Parameters

    • text: string
    • pos: number
    • cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U
        • (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U): U
        • Parameters

          • pos: number
          • end: number
          • kind: CommentKind
          • hasTrailingNewLine: boolean
          • state: T
          • memo: U

          Returns U

    • state: T
    • initial: U

    Returns U | undefined

removeEmitHelper

  • Removes an EmitHelper from a node.

    Parameters

    Returns boolean

resolveModuleName

resolveModuleNameFromCache

resolveProjectReferencePath

resolveTripleslashReference

  • resolveTripleslashReference(moduleName: string, containingFile: string): string
  • Parameters

    • moduleName: string
    • containingFile: string

    Returns string

resolveTypeReferenceDirective

setCommentRange

  • setCommentRange<T>(node: T, range: TextRange): T
  • Sets a custom text range to use when emitting comments.

    Type parameters

    Parameters

    Returns T

setConstantValue

  • Sets the constant value to emit for an expression.

    Parameters

    Returns AccessExpression

setEmitFlags

  • setEmitFlags<T>(node: T, emitFlags: EmitFlags): T
  • Sets flags that control emit behavior of a node.

    Type parameters

    Parameters

    Returns T

setOriginalNode

  • setOriginalNode<T>(node: T, original: Node | undefined): T
  • Type parameters

    Parameters

    • node: T
    • original: Node | undefined

    Returns T

setSourceMapRange

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

    Type parameters

    Parameters

    Returns T

setSyntheticLeadingComments

  • Type parameters

    Parameters

    Returns T

setSyntheticTrailingComments

  • Type parameters

    Parameters

    Returns T

setTextRange

  • setTextRange<T>(range: T, location: TextRange | undefined): T
  • Type parameters

    Parameters

    Returns T

setTokenSourceMapRange

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

    Type parameters

    Parameters

    Returns T

skipPartiallyEmittedExpressions

  • Parameters

    Returns Expression

  • Parameters

    Returns Node

sortAndDeduplicateDiagnostics

  • Type parameters

    Parameters

    • diagnostics: readonly T[]

    Returns SortedReadonlyArray<T>

symbolName

  • symbolName(symbol: Symbol): string
  • Parameters

    Returns string

textChangeRangeIsUnchanged

  • Parameters

    Returns boolean

textChangeRangeNewSpan

textSpanContainsPosition

  • textSpanContainsPosition(span: TextSpan, position: number): boolean
  • Parameters

    Returns boolean

textSpanContainsTextSpan

  • Parameters

    Returns boolean

textSpanEnd

  • Parameters

    Returns number

textSpanIntersection

  • Parameters

    Returns TextSpan | undefined

textSpanIntersectsWith

  • textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean
  • Parameters

    • span: TextSpan
    • start: number
    • length: number

    Returns boolean

textSpanIntersectsWithPosition

  • textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean
  • Parameters

    Returns boolean

textSpanIntersectsWithTextSpan

  • Parameters

    Returns boolean

textSpanIsEmpty

  • textSpanIsEmpty(span: TextSpan): boolean
  • Parameters

    Returns boolean

textSpanOverlap

  • Parameters

    Returns TextSpan | undefined

textSpanOverlapsWith

  • Parameters

    Returns boolean

toEditorSettings

tokenToString

  • tokenToString(t: SyntaxKind): string | undefined
  • Parameters

    Returns string | undefined

transform

  • Transform one or more nodes using the supplied transformers.

    Type parameters

    Parameters

    • source: T | T[]

      A single Node or an array of Node objects.

    • transformers: TransformerFactory<T>[]

      An array of TransformerFactory callbacks used to process the transformation.

    • Optional compilerOptions: CompilerOptions

      Optional compiler options.

    Returns TransformationResult<T>

transpile

  • transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string
  • Parameters

    • input: string
    • Optional compilerOptions: CompilerOptions
    • Optional fileName: string
    • Optional diagnostics: Diagnostic[]
    • Optional moduleName: string

    Returns string

transpileModule

unescapeLeadingUnderscores

  • unescapeLeadingUnderscores(identifier: __String): string
  • Remove extra underscore from escaped identifier text content.

    Parameters

    • identifier: __String

      The escaped identifier text.

    Returns string

    The unescaped identifier text.

Const updateArrayBindingPattern

Const updateArrayLiteral

  • deprecated

    Use factory.updateArrayLiteralExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns ArrayLiteralExpression

Const updateArrayTypeNode

  • deprecated

    Use factory.updateArrayTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns ArrayTypeNode

Const updateArrowFunction

Const updateAsExpression

  • deprecated

    Use factory.updateAsExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns AsExpression

Const updateAwait

  • deprecated

    Use factory.updateAwaitExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns AwaitExpression

Const updateBinary

Const updateBindingElement

Const updateBlock

  • deprecated

    Use factory.updateBlock or the factory supplied by your transformation context instead.

    Parameters

    Returns Block

Const updateBreak

  • deprecated

    Use factory.updateBreakStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns BreakStatement

Const updateBundle

  • deprecated

    Use factory.updateBundle or the factory supplied by your transformation context instead.

    Parameters

    Returns Bundle

Const updateCall

  • deprecated

    Use factory.updateCallExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns CallExpression

Const updateCallChain

  • deprecated

    Use factory.updateCallChain or the factory supplied by your transformation context instead.

    Parameters

    Returns CallChain

Const updateCallSignature

Const updateCaseBlock

  • deprecated

    Use factory.updateCaseBlock or the factory supplied by your transformation context instead.

    Parameters

    Returns CaseBlock

Const updateCaseClause

  • deprecated

    Use factory.updateCaseClause or the factory supplied by your transformation context instead.

    Parameters

    Returns CaseClause

Const updateCatchClause

  • deprecated

    Use factory.updateCatchClause or the factory supplied by your transformation context instead.

    Parameters

    Returns CatchClause

Const updateClassDeclaration

Const updateClassExpression

Const updateCommaList

  • deprecated

    Use factory.updateCommaListExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns CommaListExpression

Const updateComputedPropertyName

  • deprecated

    Use factory.updateComputedPropertyName or the factory supplied by your transformation context instead.

    Parameters

    Returns ComputedPropertyName

Const updateConditional

Const updateConditionalTypeNode

Const updateConstructSignature

Const updateConstructor

Const updateConstructorTypeNode

Const updateContinue

  • deprecated

    Use factory.updateContinueStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ContinueStatement

Const updateDecorator

  • deprecated

    Use factory.updateDecorator or the factory supplied by your transformation context instead.

    Parameters

    Returns Decorator

Const updateDefaultClause

  • deprecated

    Use factory.updateDefaultClause or the factory supplied by your transformation context instead.

    Parameters

    Returns DefaultClause

Const updateDelete

  • deprecated

    Use factory.updateDeleteExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns DeleteExpression

Const updateDo

  • deprecated

    Use factory.updateDoStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns DoStatement

Const updateElementAccess

Const updateElementAccessChain

Const updateEnumDeclaration

  • deprecated

    Use factory.updateEnumDeclaration or the factory supplied by your transformation context instead.

    Parameters

    Returns EnumDeclaration

Const updateEnumMember

  • deprecated

    Use factory.updateEnumMember or the factory supplied by your transformation context instead.

    Parameters

    Returns EnumMember

Const updateExportAssignment

  • deprecated

    Use factory.updateExportAssignment or the factory supplied by your transformation context instead.

    Parameters

    Returns ExportAssignment

Const updateExportDeclaration

Const updateExportSpecifier

  • deprecated

    Use factory.updateExportSpecifier or the factory supplied by your transformation context instead.

    Parameters

    Returns ExportSpecifier

Const updateExpressionStatement

  • deprecated

    Use factory.updateExpressionStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ExpressionStatement

Const updateExpressionWithTypeArguments

Const updateExternalModuleReference

Const updateFor

Const updateForIn

Const updateForOf

Const updateFunctionDeclaration

Const updateFunctionExpression

Const updateFunctionTypeNode

Const updateGetAccessor

Const updateHeritageClause

Const updateIf

  • deprecated

    Use factory.updateIfStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns IfStatement

Const updateImportClause

  • deprecated

    Use factory.updateImportClause or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportClause

Const updateImportDeclaration

Const updateImportEqualsDeclaration

Const updateImportSpecifier

  • deprecated

    Use factory.updateImportSpecifier or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportSpecifier

Const updateImportTypeNode

  • deprecated

    Use factory.updateImportTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns ImportTypeNode

Const updateIndexSignature

Const updateIndexedAccessTypeNode

Const updateInferTypeNode

  • deprecated

    Use factory.updateInferTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns InferTypeNode

Const updateInterfaceDeclaration

Const updateIntersectionTypeNode

Const updateJsxAttribute

Const updateJsxAttributes

  • deprecated

    Use factory.updateJsxAttributes or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxAttributes

Const updateJsxClosingElement

Const updateJsxElement

  • deprecated

    Use factory.updateJsxElement or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxElement

Const updateJsxExpression

  • deprecated

    Use factory.updateJsxExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxExpression

Const updateJsxFragment

Const updateJsxOpeningElement

Const updateJsxSelfClosingElement

Const updateJsxSpreadAttribute

  • deprecated

    Use factory.updateJsxSpreadAttribute or the factory supplied by your transformation context instead.

    Parameters

    Returns JsxSpreadAttribute

Const updateJsxText

  • updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText
  • deprecated

    Use factory.updateJsxText or the factory supplied by your transformation context instead.

    Parameters

    • node: JsxText
    • text: string
    • Optional containsOnlyTriviaWhiteSpaces: boolean

    Returns JsxText

Const updateLabel

  • deprecated

    Use factory.updateLabelStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns LabeledStatement

updateLanguageServiceSourceFile

Const updateLiteralTypeNode

Const updateMappedTypeNode

Const updateMetaProperty

  • deprecated

    Use factory.updateMetaProperty or the factory supplied by your transformation context instead.

    Parameters

    Returns MetaProperty

Const updateMethod

Const updateMethodSignature

Const updateModuleBlock

  • deprecated

    Use factory.updateModuleBlock or the factory supplied by your transformation context instead.

    Parameters

    Returns ModuleBlock

Const updateModuleDeclaration

Const updateNamedExports

  • deprecated

    Use factory.updateNamedExports or the factory supplied by your transformation context instead.

    Parameters

    Returns NamedExports

Const updateNamedImports

  • deprecated

    Use factory.updateNamedImports or the factory supplied by your transformation context instead.

    Parameters

    Returns NamedImports

Const updateNamespaceExport

  • deprecated

    Use factory.updateNamespaceExport or the factory supplied by your transformation context instead.

    Parameters

    Returns NamespaceExport

Const updateNamespaceExportDeclaration

Const updateNamespaceImport

  • deprecated

    Use factory.updateNamespaceImport or the factory supplied by your transformation context instead.

    Parameters

    Returns NamespaceImport

Const updateNew

  • deprecated

    Use factory.updateNewExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns NewExpression

Const updateNonNullChain

  • deprecated

    Use factory.updateNonNullChain or the factory supplied by your transformation context instead.

    Parameters

    Returns NonNullChain

Const updateNonNullExpression

  • deprecated

    Use factory.updateNonNullExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns NonNullExpression

Const updateObjectBindingPattern

  • deprecated

    Use factory.updateObjectBindingPattern or the factory supplied by your transformation context instead.

    Parameters

    Returns ObjectBindingPattern

Const updateObjectLiteral

Const updateOptionalTypeNode

  • deprecated

    Use factory.updateOptionalTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns OptionalTypeNode

Const updateParameter

Const updateParen

Const updateParenthesizedType

  • deprecated

    Use factory.updateParenthesizedType or the factory supplied by your transformation context instead.

    Parameters

    Returns ParenthesizedTypeNode

Const updatePartiallyEmittedExpression

Const updatePostfix

Const updatePrefix

  • deprecated

    Use factory.updatePrefixExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns PrefixUnaryExpression

Const updateProperty

Const updatePropertyAccess

Const updatePropertyAccessChain

Const updatePropertyAssignment

Const updatePropertySignature

Const updateQualifiedName

  • deprecated

    Use factory.updateQualifiedName or the factory supplied by your transformation context instead.

    Parameters

    Returns QualifiedName

Const updateRestTypeNode

  • deprecated

    Use factory.updateRestTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns RestTypeNode

Const updateReturn

  • deprecated

    Use factory.updateReturnStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ReturnStatement

Const updateSetAccessor

Const updateShorthandPropertyAssignment

updateSourceFile

  • Parameters

    Returns SourceFile

Const updateSourceFileNode

  • deprecated

    Use factory.updateSourceFile or the factory supplied by your transformation context instead.

    Parameters

    Returns SourceFile

Const updateSpread

  • deprecated

    Use factory.updateSpreadExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns SpreadElement

Const updateSpreadAssignment

  • deprecated

    Use factory.updateSpreadAssignment or the factory supplied by your transformation context instead.

    Parameters

    Returns SpreadAssignment

Const updateStatement

  • deprecated

    Use factory.updateExpressionStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ExpressionStatement

Const updateSwitch

  • deprecated

    Use factory.updateSwitchStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns SwitchStatement

Const updateTaggedTemplate

Const updateTemplateExpression

Const updateTemplateSpan

Const updateThrow

  • deprecated

    Use factory.updateThrowStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns ThrowStatement

Const updateTry

  • deprecated

    Use factory.updateTryStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns TryStatement

Const updateTupleTypeNode

  • deprecated

    Use factory.updateTupleTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TupleTypeNode

Const updateTypeAliasDeclaration

Const updateTypeAssertion

  • deprecated

    Use factory.updateTypeAssertion or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeAssertion

Const updateTypeLiteralNode

  • deprecated

    Use factory.updateTypeLiteralNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeLiteralNode

Const updateTypeOf

  • deprecated

    Use factory.updateTypeOfExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeOfExpression

Const updateTypeOperatorNode

  • deprecated

    Use factory.updateTypeOperatorNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeOperatorNode

Const updateTypeParameterDeclaration

Const updateTypePredicateNode

Const updateTypePredicateNodeWithModifier

Const updateTypeQueryNode

  • deprecated

    Use factory.updateTypeQueryNode or the factory supplied by your transformation context instead.

    Parameters

    Returns TypeQueryNode

Const updateTypeReferenceNode

Const updateUnionTypeNode

  • deprecated

    Use factory.updateUnionTypeNode or the factory supplied by your transformation context instead.

    Parameters

    Returns UnionTypeNode

Const updateVariableDeclaration

Const updateVariableDeclarationList

Const updateVariableStatement

Const updateVoid

  • deprecated

    Use factory.updateVoidExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns VoidExpression

Const updateWhile

  • deprecated

    Use factory.updateWhileStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns WhileStatement

Const updateWith

  • deprecated

    Use factory.updateWithStatement or the factory supplied by your transformation context instead.

    Parameters

    Returns WithStatement

Const updateYield

  • deprecated

    Use factory.updateYieldExpression or the factory supplied by your transformation context instead.

    Parameters

    Returns YieldExpression

validateLocaleAndSetLanguage

  • validateLocaleAndSetLanguage(locale: string, sys: { fileExists: any; getExecutingFilePath: any; readFile: any; resolvePath: any }, errors?: Push<Diagnostic>): void
  • Checks to see if the locale is in the appropriate format, and if it is, attempts to set the appropriate language.

    Parameters

    • locale: string
    • sys: { fileExists: any; getExecutingFilePath: any; readFile: any; resolvePath: any }
      • fileExists: function
        • fileExists(fileName: string): boolean
        • Parameters

          • fileName: string

          Returns boolean

      • getExecutingFilePath: function
        • getExecutingFilePath(): string
        • Returns string

      • readFile: function
        • readFile(fileName: string): string
        • Parameters

          • fileName: string

          Returns string

      • resolvePath: function
        • resolvePath(path: string): string
        • Parameters

          • path: string

          Returns string

    • Optional errors: Push<Diagnostic>

    Returns void

visitEachChild

  • Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.

    Type parameters

    Parameters

    • node: T

      The Node whose children will be visited.

    • visitor: Visitor

      The callback used to visit each child.

    • context: TransformationContext

      A lexical environment context for the visitor.

    Returns T

  • Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.

    Type parameters

    Parameters

    • node: T | undefined

      The Node whose children will be visited.

    • visitor: Visitor

      The callback used to visit each child.

    • context: TransformationContext

      A lexical environment context for the visitor.

    • Optional nodesVisitor: typeof visitNodes
    • Optional tokenVisitor: Visitor

    Returns T | undefined

visitFunctionBody

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

    Parameters

    Returns FunctionBody

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

    Parameters

    Returns FunctionBody | undefined

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

    Parameters

    Returns ConciseBody

visitIterationBody

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

    Parameters

    Returns Statement

visitLexicalEnvironment

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

    Parameters

    Returns NodeArray<Statement>

visitNode

  • visitNode<T>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T
  • visitNode<T>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined
  • Visits a Node using the supplied visitor, possibly returning a new Node in its place.

    Type parameters

    Parameters

    • node: T

      The Node to visit.

    • visitor: Visitor | undefined

      The callback used to visit the Node.

    • Optional test: (node: Node) => boolean

      A callback to execute to verify the Node is valid.

        • (node: Node): boolean
        • Parameters

          Returns boolean

    • Optional lift: (node: readonly Node[]) => T

      An optional callback to execute to lift a NodeArray into a valid Node.

        • (node: readonly Node[]): T
        • Parameters

          • node: readonly Node[]

          Returns T

    Returns T

  • Visits a Node using the supplied visitor, possibly returning a new Node in its place.

    Type parameters

    Parameters

    • node: T | undefined

      The Node to visit.

    • visitor: Visitor | undefined

      The callback used to visit the Node.

    • Optional test: (node: Node) => boolean

      A callback to execute to verify the Node is valid.

        • (node: Node): boolean
        • Parameters

          Returns boolean

    • Optional lift: (node: readonly Node[]) => T

      An optional callback to execute to lift a NodeArray into a valid Node.

        • (node: readonly Node[]): T
        • Parameters

          • node: readonly Node[]

          Returns T

    Returns T | undefined

visitNodes

  • visitNodes<T>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>
  • visitNodes<T>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined
  • Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.

    Type parameters

    Parameters

    • nodes: NodeArray<T>

      The NodeArray to visit.

    • visitor: Visitor | undefined

      The callback used to visit a Node.

    • Optional test: (node: Node) => boolean

      A node test to execute for each node.

        • (node: Node): boolean
        • Parameters

          Returns boolean

    • Optional start: number

      An optional value indicating the starting offset at which to start visiting.

    • Optional count: number

      An optional value indicating the maximum number of nodes to visit.

    Returns NodeArray<T>

  • Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.

    Type parameters

    Parameters

    • nodes: NodeArray<T> | undefined

      The NodeArray to visit.

    • visitor: Visitor | undefined

      The callback used to visit a Node.

    • Optional test: (node: Node) => boolean

      A node test to execute for each node.

        • (node: Node): boolean
        • Parameters

          Returns boolean

    • Optional start: number

      An optional value indicating the starting offset at which to start visiting.

    • Optional count: number

      An optional value indicating the maximum number of nodes to visit.

    Returns NodeArray<T> | undefined

visitParameterList

walkUpBindingElementsAndPatterns

Generated using TypeDoc