ProtectedconstructorStatic ReadonlyisStatic ReadonlyisGets if the node is an ArrayBindingPattern.
Static ReadonlyisGets if the node is an ArrayLiteralExpression.
Static ReadonlyisGets if the node is an ArrowFunction.
Static ReadonlyisGets if the node is an AsExpression.
Static ReadonlyisGets if the node is an AwaitExpression.
Static ReadonlyisGets if the node is a BigIntLiteral.
Static ReadonlyisGets if the node is a BinaryExpression.
Static ReadonlyisGets if the node is a BindingElement.
Static ReadonlyisGets if the node is a Block.
Static ReadonlyisGets if the node is a BooleanKeyword.
Static ReadonlyisGets if the node is a BreakStatement.
Static ReadonlyisGets if the node is a CallExpression.
Static ReadonlyisGets if the node is a CaseBlock.
Static ReadonlyisGets if the node is a CaseClause.
Static ReadonlyisGets if the node is a CatchClause.
Static ReadonlyisGets if the node is a ClassDeclaration.
Static ReadonlyisGets if the node is a ClassExpression.
Static ReadonlyisGets if the node is a ClassStaticBlockDeclaration.
Static ReadonlyisGets if the node is a CommaListExpression.
Static ReadonlyisGets if the node is a ComputedPropertyName.
Static ReadonlyisGets if the node is a ConditionalExpression.
Static ReadonlyisGets if the node is a ContinueStatement.
Static ReadonlyisGets if the node is a DebuggerStatement.
Static ReadonlyisGets if the node is a Decorator.
Static ReadonlyisGets if the node is a DefaultClause.
Static ReadonlyisGets if the node is a DeleteExpression.
Static ReadonlyisGets if the node is a DoStatement.
Static ReadonlyisGets if the node is an ElementAccessExpression.
Static ReadonlyisGets if the node is an EmptyStatement.
Static ReadonlyisGets if the node is an EnumDeclaration.
Static ReadonlyisGets if the node is an EnumMember.
Static ReadonlyisGets if the node is an ExportAssignment.
Static ReadonlyisGets if the node is an ExportDeclaration.
Static ReadonlyisGets if the node is an ExportSpecifier.
Static ReadonlyisGets if the node is an ExpressionStatement.
Static ReadonlyisGets if the node is an ExpressionWithTypeArguments.
Static ReadonlyisGets if the node is an ExternalModuleReference.
Static ReadonlyisGets if the node is a ForInStatement.
Static ReadonlyisGets if the node is a ForOfStatement.
Static ReadonlyisGets if the node is a ForStatement.
Static ReadonlyisGets if the node is a FunctionDeclaration.
Static ReadonlyisGets if the node is a FunctionExpression.
Static ReadonlyisGets if the node is a HeritageClause.
Static ReadonlyisGets if the node is a Identifier.
Static ReadonlyisGets if the node is a IfStatement.
Static ReadonlyisGets if the node is a ImportAttribute.
Static ReadonlyisGets if the node is a ImportAttributes.
Static ReadonlyisGets if the node is a ImportClause.
Static ReadonlyisGets if the node is a ImportDeclaration.
Static ReadonlyisGets if the node is a ImportEqualsDeclaration.
Static ReadonlyisGets if the node is a ImportSpecifier.
Static ReadonlyisGets if the node is a InferKeyword.
Static ReadonlyisGets if the node is a InterfaceDeclaration.
Static ReadonlyisGets if the node is a JSDoc.
Static ReadonlyisGets if the node is a JSDocAllType.
Static ReadonlyisGets if the node is a JSDocAugmentsTag.
Static ReadonlyisGets if the node is a JSDocAuthorTag.
Static ReadonlyisGets if the node is a JSDocCallbackTag.
Static ReadonlyisGets if the node is a JSDocClassTag.
Static ReadonlyisGets if the node is a JSDocDeprecatedTag.
Static ReadonlyisGets if the node is a JSDocEnumTag.
Static ReadonlyisGets if the node is a JSDocFunctionType.
Static ReadonlyisGets if the node is a JSDocImplementsTag.
Static ReadonlyisGets if the node is a JSDocLink.
Static ReadonlyisGets if the node is a JSDocLinkCode.
Static ReadonlyisGets if the node is a JSDocLinkPlain.
Static ReadonlyisGets if the node is a JSDocMemberName.
Static ReadonlyisGets if the node is a JSDocNamepathType.
Static ReadonlyisGets if the node is a JSDocNameReference.
Static ReadonlyisGets if the node is a JSDocNonNullableType.
Static ReadonlyisGets if the node is a JSDocNullableType.
Static ReadonlyisGets if the node is a JSDocOptionalType.
Static ReadonlyisGets if the node is a JSDocOverloadTag.
Static ReadonlyisGets if the node is a JSDocOverrideTag.
Static ReadonlyisGets if the node is a JSDocParameterTag.
Static ReadonlyisGets if the node is a JSDocPrivateTag.
Static ReadonlyisGets if the node is a JSDocPropertyTag.
Static ReadonlyisGets if the node is a JSDocProtectedTag.
Static ReadonlyisGets if the node is a JSDocPublicTag.
Static ReadonlyisGets if the node is a JSDocReadonlyTag.
Static ReadonlyisGets if the node is a JSDocReturnTag.
Static ReadonlyisGets if the node is a JSDocSatisfiesTag.
Static ReadonlyisGets if the node is a JSDocSeeTag.
Static ReadonlyisGets if the node is a JSDocSignature.
Static ReadonlyisGets if the node is a JSDocTemplateTag.
Static ReadonlyisGets if the node is a JSDocText.
Static ReadonlyisGets if the node is a JSDocThisTag.
Static ReadonlyisGets if the node is a JSDocThrowsTag.
Static ReadonlyisGets if the node is a JSDocTypedefTag.
Static ReadonlyisGets if the node is a JSDocTypeExpression.
Static ReadonlyisGets if the node is a JSDocTypeLiteral.
Static ReadonlyisGets if the node is a JSDocTypeTag.
Static ReadonlyisGets if the node is a JSDocUnknownType.
Static ReadonlyisGets if the node is a JSDocVariadicType.
Static ReadonlyisGets if the node is a JsxAttribute.
Static ReadonlyisGets if the node is a JsxClosingElement.
Static ReadonlyisGets if the node is a JsxClosingFragment.
Static ReadonlyisGets if the node is a JsxElement.
Static ReadonlyisGets if the node is a JsxExpression.
Static ReadonlyisGets if the node is a JsxFragment.
Static ReadonlyisGets if the node is a JsxNamespacedName.
Static ReadonlyisGets if the node is a JsxOpeningElement.
Static ReadonlyisGets if the node is a JsxOpeningFragment.
Static ReadonlyisGets if the node is a JsxSelfClosingElement.
Static ReadonlyisGets if the node is a JsxSpreadAttribute.
Static ReadonlyisGets if the node is a JsxText.
Static ReadonlyisGets if the node is a LabeledStatement.
Static ReadonlyisGets if the node is a MetaProperty.
Static ReadonlyisGets if the node is a MethodDeclaration.
Static ReadonlyisGets if the node is a MethodSignature.
Static ReadonlyisGets if the node is a ModuleBlock.
Static ReadonlyisGets if the node is a ModuleDeclaration.
Static ReadonlyisGets if the node is a NamedExports.
Static ReadonlyisGets if the node is a NamedImports.
Static ReadonlyisGets if the node is a NamedTupleMember.
Static ReadonlyisGets if the node is a NamespaceExport.
Static ReadonlyisGets if the node is a NamespaceImport.
Static ReadonlyisGets if the node is a NeverKeyword.
Static ReadonlyisGets if the node is a NewExpression.
Static ReadonlyisGets if the node is a NonNullExpression.
Static ReadonlyisGets if the node is a NoSubstitutionTemplateLiteral.
Static ReadonlyisGets if the node is a NotEmittedStatement.
Static ReadonlyisGets if the node is a NumberKeyword.
Static ReadonlyisGets if the node is a NumericLiteral.
Static ReadonlyisGets if the node is a ObjectBindingPattern.
Static ReadonlyisGets if the node is a ObjectKeyword.
Static ReadonlyisGets if the node is a ObjectLiteralExpression.
Static ReadonlyisGets if the node is a OmittedExpression.
Static ReadonlyisGets if the node is a ParenthesizedExpression.
Static ReadonlyisGets if the node is a PartiallyEmittedExpression.
Static ReadonlyisGets if the node is a PostfixUnaryExpression.
Static ReadonlyisGets if the node is a PrefixUnaryExpression.
Static ReadonlyisGets if the node is a PrivateIdentifier.
Static ReadonlyisGets if the node is a PropertyAccessExpression.
Static ReadonlyisGets if the node is a PropertyAssignment.
Static ReadonlyisGets if the node is a PropertyDeclaration.
Static ReadonlyisGets if the node is a PropertySignature.
Static ReadonlyisGets if the node is a QualifiedName.
Static ReadonlyisGets if the node is a RegularExpressionLiteral.
Static ReadonlyisGets if the node is a ReturnStatement.
Static ReadonlyisGets if the node is a SatisfiesExpression.
Static ReadonlyisGets if the node is a SemicolonToken.
Static ReadonlyisGets if the node is a ShorthandPropertyAssignment.
Static ReadonlyisGets if the node is a SourceFile.
Static ReadonlyisGets if the node is a SpreadAssignment.
Static ReadonlyisGets if the node is a SpreadElement.
Static ReadonlyisGets if the node is a StringKeyword.
Static ReadonlyisGets if the node is a StringLiteral.
Static ReadonlyisGets if the node is a SwitchStatement.
Static ReadonlyisGets if the node is a SymbolKeyword.
Static ReadonlyisGets if the node is a SyntaxList.
Static ReadonlyisGets if the node is a TaggedTemplateExpression.
Static ReadonlyisGets if the node is a TemplateExpression.
Static ReadonlyisGets if the node is a TemplateHead.
Static ReadonlyisGets if the node is a TemplateMiddle.
Static ReadonlyisGets if the node is a TemplateSpan.
Static ReadonlyisGets if the node is a TemplateTail.
Static ReadonlyisGets if the node is a ThrowStatement.
Static ReadonlyisGets if the node is a TryStatement.
Static ReadonlyisGets if the node is a TypeAliasDeclaration.
Static ReadonlyisGets if the node is a TypeOfExpression.
Static ReadonlyisGets if the node is a UndefinedKeyword.
Static ReadonlyisGets if the node is a VariableDeclaration.
Static ReadonlyisGets if the node is a VariableDeclarationList.
Static ReadonlyisGets if the node is a VariableStatement.
Static ReadonlyisGets if the node is a VoidExpression.
Static ReadonlyisGets if the node is a WhileStatement.
Static ReadonlyisGets if the node is a WithStatement.
Static ReadonlyisGets if the node is a YieldExpression.
Gets the underlying compiler node.
Adds a constructor.
Optionalstructure: OptionalKind<ConstructorDeclarationStructure>Structure of the constructor.
Adds constructors.
Structures of the constructor.
Adds a decorator.
Structure of the decorator.
Adds decorators.
Structures of the decorators.
Add get accessor.
Structure representing the get accessor.
Add properties.
Structures representing the properties.
Adds an implements clause.
Text to add for the implements clause.
Adds multiple implements clauses.
Texts to add for the implements clause.
Adds a JS doc.
Structure to add.
Adds JS docs.
Structures to add.
Inserts a class member.
Class member to insert.
Inserts class members.
Collection of class members to insert.
Add method.
Structure representing the method.
Add methods.
Structures representing the methods.
Add properties.
Structures representing the properties.
Add property.
Structure representing the property.
Add set accessor.
Structure representing the set accessor.
Add properties.
Structures representing the properties.
Adds a static block.
Optionalstructure: OptionalKind<ClassStaticBlockDeclarationStructure>Structure of the static block.
Adds static block.
Structures of the static block.
Adds a type parameter.
Structure of the type parameter.
Adds type parameters.
Structures of the type parameters.
Appends the specified whitespace to current node.
Text or writer function.
Gets the node as the specified kind if it is equal to that kind, otherwise returns undefined.
Syntax kind.
Gets the node as the specified kind if it is equal to that kind, otherwise throws.
Syntax kind.
Optionalmessage: string | (() => string)If the node contains the provided range (inclusive).
Start position.
End position.
Extracts an interface declaration structure from the class.
Optionalname: stringName of the interface. Falls back to the same name as the class and then the filepath's base name.
Extracts an interface declaration structure from the static part of the class.
Name of the interface.
Finds the references of the definition of the node.
Invokes the cbNode callback for each child and the cbNodeArray for every array of nodes stored in properties of the node.
If cbNodeArray is not defined, then it will pass every element of the array to cbNode.
The first truthy value returned by a callback.
Invokes the cbNode callback for each descendant and the cbNodeArray for every array of nodes stored in properties of the node and descendant nodes.
If cbNodeArray is not defined, then it will pass every element of the array to cbNode.
Callback invoked for each descendant.
OptionalcbNodeArray: (Callback invoked for each array of nodes.
The first truthy value returned by a callback.
Releases the node and all its descendants from the underlying node cache and ast.
This is useful if you want to improve the performance of manipulation by not tracking this node anymore.
Forgets the descendants of this node.
Formats the node's text using the internal TypeScript formatting API.
Optionalsettings: FormatCodeSettingsFormat code settings.
Gets the abstract keyword or throws if it doesn't exist.
Optionalmessage: string | (() => string)Gets the base class.
Note: Use getBaseTypes if you need to get the mixins.
Gets the base class or throws.
Note: Use getBaseTypes if you need to get the mixins.
Optionalmessage: string | (() => string)Gets the child at the specified index if it's the specified kind or returns undefined.
Child index to get.
Expected kind.
Gets the child at the specified index if it's the specified kind or throws an exception.
Child index to get.
Expected kind.
Optionalmessage: string | (() => string)Gets the number of children the node has.
Gets the child indentation level of the current node.
Gets the next indentation level text.
Optionaloffset: numberOptional number of levels of indentation to add or remove.
Gets the child index of this node relative to the parent.
Gets the children based on a kind.
Syntax kind.
Gets the child syntax list if it exists.
Gets the child syntax list or throws if it doesn't exist.
Optionalmessage: string | (() => string)Gets the combined modifier flags.
Gets the constructor declarations.
Gets the declare keyword or throws if it doesn't exist.
Optionalmessage: string | (() => string)Gets a decorator or undefined if it doesn't exist.
Name of the parameter.
Gets a decorator or throws if it doesn't exist.
Name of the parameter.
Gets all the decorators of the node.
Gets the default keyword or throws if none exists.
Optionalmessage: string | (() => string)Gets all the derived classes.
Gets the descendants that match a specified syntax kind.
Kind to check.
Gets the node's descendant statements and any arrow function statement-like expressions (ex. returns the expression 5 in () => 5).
Gets the line number of the end of the node.
Gets the export keyword or throws if none exists.
Optionalmessage: string | (() => string)Gets the extends expression or returns undefined if it doesn't exist.
Gets the extends expression or throws if it doesn't exist.
Optionalmessage: string | (() => string)Get the first ancestor by syntax kind.
Syntax kind.
Gets the first ancestor by syntax kind or throws if not found.
Syntax kind.
Optionalmessage: string | (() => string)Gets the first child by syntax kind.
Syntax kind.
Gets the first child by syntax kind or throws an error if not found.
Syntax kind.
Optionalmessage: string | (() => string)Gets the first child if it matches the specified syntax kind.
Syntax kind.
Gets the first child if it matches the specified syntax kind or throws an error if not found.
Syntax kind.
Optionalmessage: string | (() => string)Gets the first descendant by syntax kind.
Syntax kind.
Gets the first descendant by syntax kind or throws.
Syntax kind.
Optionalmessage: string | (() => string)Gets the first modifier of the specified syntax kind or undefined if none found.
Syntax kind.
Gets the first modifier of the specified syntax kind or throws if none found.
Syntax kind.
Gets the source file text position of the end of the last significant token or the start of the source file.
Gets the full text with leading trivia (comments and whitespace).
Gets the text length of the node with trivia.
Gets the first get accessor declaration by name.
Name.
Gets the first get accessor declaration by a find function.
Function to find a get accessor declaration by.
Gets the first get accessor declaration by name or throws if it doesn't exist.
Name.
Gets the first get accessor declaration by a find function or throws if it doesn't exist.
Function to find a get accessor declaration by.
Gets the class get accessor declarations regardless of whether it's an instance of static getAccessor.
Gets the heritage clause by kind.
Gets the heritage clause by kind or throws if it doesn't exist.
Gets the heritage clauses of the node.
Gets the implements clauses.
Gets the indentation level of the current node.
Gets the indentation text.
Optionaloffset: numberOptional number of levels of indentation to add or remove.
Gets the first instance member by name.
Name.
Gets the first instance member by a find function.
Function to find the instance member by.
Gets the first instance member by name or throws if not found.
Name.
Gets the first instance member by a find function. or throws if not found.
Function to find the instance member by.
Gets the instance members.
Gets the first instance method by name.
Name.
Gets the first instance method by a find function.
Function to find an instance method by.
Gets the first instance method by name or throws if not found.
Name.
Gets the first instance method by a find function. or throws if not found.
Function to find an instance method by.
Gets the class instance method declarations.
Gets the class instance property declarations.
Gets the first instance property by name.
Name.
Gets the first instance property by a find function.
Function to find an instance property by.
Gets the first instance property by name or throws if not found.
Name.
Gets the first instance property by a find function or throws if not found.
Function to find an instance property by.
Gets the JS doc nodes.
Gets the syntax kind.
Gets the syntax kind name.
Gets the last child by syntax kind.
Syntax kind.
Gets the last child by syntax kind or throws an error if not found.
Syntax kind.
Optionalmessage: string | (() => string)Gets the last child if it matches the specified syntax kind.
Syntax kind.
Gets the last child if it matches the specified syntax kind or throws an error if not found.
Syntax kind.
Optionalmessage: string | (() => string)Gets the last token of this node. Usually this is a close brace.
Gets the leading comment ranges of the current node.
Gets the node's leading trivia's text length.
Gets the specified local symbol by name or returns undefined if it doesn't exist.
WARNING: The symbol table of locals is not exposed publicly by the compiler. Use this at your own risk knowing it may break.
Name of the local symbol.
Gets the specified local symbol by name or throws if it doesn't exist.
WARNING: The symbol table of locals is not exposed publicly by the compiler. Use this at your own risk knowing it may break.
Name of the local symbol.
Optionalmessage: string | (() => string)Gets the symbols within the current scope.
WARNING: The symbol table of locals is not exposed publicly by the compiler. Use this at your own risk knowing it may break.
Gets the first member by a find function.
Function to find an method by.
Gets the first member by name or throws if not found.
Name.
Gets the first member by a find function. or throws if not found.
Function to find an method by.
Gets the class' members regardless of whether it's an instance of static member.
Gets the class' members with comment class elements.
Gets the first method declaration by name.
Name.
Gets the first method declaration by a find function.
Function to find a method declaration by.
Gets the first method declaration by name or throws if it doesn't exist.
Name.
Gets the first method declaration by a find function or throws if it doesn't exist.
Function to find a method declaration by.
Gets the class method declarations regardless of whether it's an instance of static method.
Gets the name if it exists.
Gets the name node if it exists.
Gets the name node if it exists, or throws.
Optionalmessage: string | (() => string)Gets the name if it exists, or throws.
Optionalmessage: string | (() => string)Gets the next sibling if it matches the specified kind.
Kind to check.
Gets the next sibiling if it matches the specified kind, or throws.
Kind to check.
Optionalmessage: string | (() => string)Gets a compiler node property wrapped in a Node.
Property name.
Gets the first source file text position that is not whitespace taking into account comment nodes and a previous node's trailing trivia.
Gets the parent if it's a certain syntax kind.
Gets the parent if it's a certain syntax kind or throws.
Optionalmessage: string | (() => string)Gets the parent module declaration or undefined if it doesn't exist.
Gets the parent module declaration or throws if it doesn't exist.
Optionalmessage: string | (() => string)Gets the parent if it's a syntax list.
Gets the parent if it's a syntax list or throws an error otherwise.
Optionalmessage: string | (() => string)Goes up the parents (ancestors) of the node while a condition is true. Returns undefined if the initial parent doesn't match the condition.
Goes up the parents (ancestors) of the node while the parent is the specified syntax kind. Returns undefined if the initial parent is not the specified syntax kind.
Syntax kind to check for.
Goes up the parents (ancestors) of the node while the parent is the specified syntax kind. Throws if the initial parent is not the specified syntax kind.
Syntax kind to check for.
Optionalmessage: string | (() => string)Goes up the parents (ancestors) of the node while a condition is true. Throws if the initial parent doesn't match the condition.
Goes up the parents (ancestors) of the node while a condition is true. Throws if the initial parent doesn't match the condition.
Gets the source file text position where the node starts that includes the leading trivia (comments and whitespace).
Gets the previous sibling if it matches the specified kind.
Kind to check.
Gets the previous sibiling if it matches the specified kind, or throws.
Kind to check.
Optionalmessage: string | (() => string)Gets the project.
Gets the class property declarations regardless of whether it's an instance of static property.
Gets the first property declaration by name.
Name.
Gets the first property declaration by a find function.
Function to find a property declaration by.
Gets the first property declaration by name or throws if it doesn't exist.
Name.
Gets the first property declaration by a find function or throws if it doesn't exist.
Function to find a property declaration by.
Sets the first set accessor declaration by name.
Name.
Sets the first set accessor declaration by a find function.
Function to find a set accessor declaration by.
Sets the first set accessor declaration by name or throws if it doesn't exist.
Name.
Sets the first set accessor declaration by a find function or throws if it doesn't exist.
Function to find a set accessor declaration by.
Sets the class set accessor declarations regardless of whether it's an instance of static setAccessor.
Gets the source file.
Gets the source file text position where the node starts that does not include the leading trivia (comments and whitespace).
OptionalincludeJsDocComments: booleanWhether to include the JS doc comments.
Gets the line number at the start of the node.
OptionalincludeJsDocComments: booleanWhether to include the JS doc comments or not.
Gets the position of the start of the line that this node starts on.
OptionalincludeJsDocComments: booleanWhether to include the JS doc comments or not.
Gets the static blocks.
Gets the first static member by name.
Name.
Gets the first static member by a find function.
Function to find an static method by.
Gets the first static member by name or throws if not found.
Name.
Gets the first static member by a find function. or throws if not found.
Function to find an static method by.
Gets the static members.
Gets the first static method by name.
Name.
Gets the first static method by a find function.
Function to find a static method by.
Gets the first static method by name or throws if not found.
Name.
Gets the first static method by a find function. or throws if not found.
Function to find a static method by.
Gets the class instance method declarations.
Gets the class instance property declarations.
Gets the first static property by name.
Name.
Gets the first static property by a find function.
Function to find a static property by.
Gets the first static property by name or throws if not found.
Name.
Gets the first static property by a find function. or throws if not found.
Function to find a static property by.
Gets the structure equivalent to this node.
Gets the compiler symbol or undefined if it doesn't exist.
Gets the symbol or throws an error if it doesn't exist.
Optionalmessage: string | (() => string)Gets the symbols in the scope of the node.
Note: This will always return the local symbols. If you want the export symbol from a local symbol, then
use the #getExportSymbol() method on the symbol.
Meaning of symbol to filter by.
Gets the text without leading trivia (comments and whitespace).
OptionalincludeJsDocComments: booleanWhether to include the js doc comments when getting the text.
Gets the text without leading trivia (comments and whitespace).
Options for getting the text.
Gets the trailing comment ranges of the current node.
Gets the text position of the next significant token or new line.
Gets the text length from the end of the current node to the next significant token or new line.
Gets the type of the node.
Gets a type parameter or undefined if it doesn't exist.
Name of the parameter.
Gets a type parameter or undefined if it doesn't exist.
Function to use to find the type parameter.
Gets a type parameter or throws if it doesn't exist.
Name of the parameter.
Gets a type parameter or throws if it doesn't exist.
Function to use to find the type parameter.
Gets the type parameters.
Gets the text length of the node without trivia.
OptionalincludeJsDocComments: booleanWhether to include the JS doc comments in the width or not.
If the node has the declare keyword.
If the node has the default keyword.
If the node has the export keyword.
Gets if it has the specified modifier.
Syntax kind to check for.
Gets if it has the specified modifier.
Text to check for.
Inserts a constructor.
Child index to insert at.
Optionalstructure: OptionalKind<ConstructorDeclarationStructure>Structure of the constructor.
Inserts constructors.
Child index to insert at.
Structures of the constructor.
Inserts a decorator.
Child index to insert at. Specify a negative index to insert from the reverse.
Structure of the decorator.
Insert decorators.
Child index to insert at.
Structures to insert.
Insert get accessor.
Child index to insert at.
Structure representing the get accessor.
Insert properties.
Child index to insert at.
Structures representing the properties.
Inserts an implements clause.
Inserts multiple implements clauses.
Texts to insert for the implements clause.
Inserts a JS doc.
Child index to insert at.
Structure to insert.
Inserts JS docs.
Child index to insert at.
Structures to insert.
Inserts a class member.
Child index to insert at.
Class member to insert.
Inserts class members.
Child index to insert at.
Collection of class members to insert.
Insert method.
Child index to insert at.
Structure representing the method.
Insert methods.
Child index to insert at.
Structures representing the methods.
Insert properties.
Child index to insert at.
Structures representing the properties.
Insert property.
Child index to insert at.
Structure representing the property.
Insert set accessor.
Child index to insert at.
Structure representing the set accessor.
Insert properties.
Child index to insert at.
Structures representing the properties.
Inserts a static block.
Child index to insert at.
Optionalstructure: OptionalKind<ClassStaticBlockDeclarationStructure>Structure of the static block.
Inserts static blocks.
Child index to insert at.
Structures of the static blocks.
Inserts text within the body of the node.
WARNING: This will forget any previously navigated descendant nodes.
Position to insert at.
Text to insert.
Inserts a type parameter.
Child index to insert at. Specify a negative index to insert from the reverse.
Structure of the type parameter.
Inserts type parameters.
Child index to insert at. Specify a negative index to insert from the reverse.
Structures of the type parameters.
Gets if the node is abstract.
Gets if the node is ambient.
Gets if this node is a default export of a file.
Gets if the node is exported from a namespace, is a default export, or is a named export.
Gets if this is the first node on the current line.
Gets if the specified position is within a string.
Position.
Gets if this node is in a syntax list.
Returns if the node is the specified kind.
This is a type guard.
Syntax kind.
Gets if this node is a named export of a file.
Prepends the specified whitespace to current node.
Text or writer function.
Prints the node using the compiler's printer.
Optionaloptions: PrintNodeOptionsOptions.
Removes the statement.
Removes the extends expression, if it exists.
Removes the implements at the specified index.
Index to remove.
Removes the specified implements.
Node of the implements to remove.
Removes the name from the node.
Removes all the text within the node
Removes text within the body of the node.
WARNING: This will forget any previously navigated descendant nodes.
Start position to remove.
End position to remove.
Renames the name of the node.
New name.
Optionaloptions: RenameOptionsOptions for renaming.
Replaces text within the body of the node.
WARNING: This will forget any previously navigated descendant nodes.
Start and end position of the text to replace.
Text to replace the range with.
Replaces the text of the current node with new text.
This will forget the current node and return a new node that can be asserted or type guarded to the correct type.
Text or writer function to replace with.
The new node.
Sets the node from a structure.
Structure to set the node with.
Sets the extends expression.
Text to set as the extends expression.
Sets if this node has a declare keyword.
Optionalvalue: booleanTo add the declare keyword or not.
Sets if the node is abstract.
If it should be abstract or not.
Sets if this node is a default export of a file.
If it should be a default export or not.
Sets if the node is exported.
Note: Will remove the default keyword if set.
If it should be exported or not.
Sets the child order of the node within the parent.
Toggles a modifier.
Text to toggle the modifier for.
Optionalvalue: booleanOptional toggling value.
Transforms the node using the compiler api nodes and functions and returns the node that was transformed (experimental).
WARNING: This will forget descendants of transformed nodes and potentially this node.
sourceFile.transform(traversal => {
const node = traversal.visitChildren(); // recommend always visiting the children first (post order)
if (ts.isNumericLiteral(node))
return ts.createNumericLiteral((parseInt(node.text, 10) + 1).toString());
return node;
});
const classDec = sourceFile.getClassOrThrow("MyClass");
classDec.transform(traversal => {
const node = traversal.currentNode;
return ts.updateClassDeclaration(node, undefined, undefined, ts.createIdentifier("MyUpdatedClass"), undefined, undefined, []);
});
Gets if the compiler node was forgotten.
This will be true when the compiler node was forgotten or removed.
StatichasStatichasStatichasStatichasStaticisStaticisGets if the node is an AbstractableNode.
StaticisGets if the node is an AmbientableNode.
StaticisStaticisGets if the node is an ArrayTypeNode.
StaticisGets if the node is an AsyncableNode.
StaticisStaticisStaticisStaticisStaticisGets if the node is a CallSignatureDeclaration.
StaticisStaticisStaticisGets if the provided node is a CommentClassElement.
StaticisGets if the provided node is a CommentEnumMember.
StaticisGets if the provided node is a comment node.
StaticisGets if the provided node is a CommentObjectLiteralElement.
StaticisGets if the provided node is a CommentStatement.
StaticisGets if the provided value is a CommentTypeElement.
StaticisGets if the node is a ConditionalTypeNode.
StaticisGets if the node is a ConstructorDeclaration.
StaticisGets if the node is a ConstructorTypeNode.
StaticisGets if the node is a ConstructSignatureDeclaration.
StaticisGets if the node is a DecoratableNode.
StaticisStaticisStaticisGets if the node is an ExportableNode.
StaticisStaticisGets if the node is an Expression.
StaticisStaticisStaticisGets if the node is an ExtendsClauseableNode.
StaticisGets if the node is a FalseLiteral.
StaticisStaticisGets if the node is a FunctionTypeNode.
StaticisStaticisGets if the node is a GetAccessorDeclaration.
StaticisStaticisGets if the node is a ImplementsClauseableNode.
StaticisStaticisGets if the node is a ImportExpression.
StaticisGets if the node is a ImportTypeNode.
StaticisGets if the node is a IndexedAccessTypeNode.
StaticisGets if the node is a IndexSignatureDeclaration.
StaticisGets if the node is a InferTypeNode.
StaticisStaticisStaticisGets if the node is a IntersectionTypeNode.
StaticisGets if the node is a IterationStatement.
StaticisStaticisStaticisStaticisStaticisStaticisStaticisGets if the node is a JSDocUnknownTag.
StaticisGets if the node is a JsxAttributedNode.
StaticisStaticisGets if the node is a LeftHandSideExpression.
StaticisStaticisGets if the node is a LiteralExpression.
StaticisStaticisGets if the node is a LiteralTypeNode.
StaticisGets if the node is a MappedTypeNode.
StaticisGets if the node is a MemberExpression.
StaticisStaticisStaticisGets if the node is a ModuledNode.
StaticisStaticisStaticisStaticisStaticisGets if the node is a NodeWithTypeArguments.
StaticisGets if the node is a NullLiteral.
StaticisGets if the node is a OverloadableNode.
StaticisGets if the node is a OverrideableNode.
StaticisGets if the node is a ParameterDeclaration.
StaticisStaticisGets if the node is a ParenthesizedTypeNode.
StaticisGets if the node is a PrimaryExpression.
StaticisStaticisStaticisStaticisGets if the node is a ReadonlyableNode.
StaticisStaticisStaticisGets if the node is a RestTypeNode.
StaticisStaticisGets if the node is a ScopeableNode.
StaticisStaticisGets if the node is a SetAccessorDeclaration.
StaticisStaticisStaticisStaticisGets if the node is a StaticableNode.
StaticisGets if the node is a SuperExpression.
StaticisGets if the node is a TemplateLiteralTypeNode.
StaticisStaticisGets if the node is a ThisExpression.
StaticisGets if the node is a ThisTypeNode.
StaticisGets if the node is a TrueLiteral.
StaticisGets if the node is a TupleTypeNode.
StaticisStaticisGets if the node is a TypeAssertion.
StaticisStaticisGets if the node is a TypeElement.
StaticisStaticisGets if the node is a TypeLiteralNode.
StaticisStaticisGets if the node is a TypeOperatorTypeNode.
StaticisGets if the node is a TypeParameterDeclaration.
StaticisStaticisGets if the node is a TypePredicateNode.
StaticisGets if the node is a TypeQueryNode.
StaticisGets if the node is a TypeReferenceNode.
StaticisGets if the node is a UnaryExpression.
StaticisStaticisGets if the node is a UnionTypeNode.
StaticisStaticisGets if the node is a UpdateExpression.
Gets if the node is an AnyKeyword.