Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/src/dev/deps.ts>Node

The next-gen web framework.
Extremely Popular
Go to Latest
class Node
import { Node } from "https://deno.land/x/fresh@1.6.1/src/dev/deps.ts";

Constructors

new
protected
Node()

Type Parameters

optional
NodeType extends ts.Node = ts.Node

Properties

readonly
compilerNode: NodeType

Gets the underlying compiler node.

Methods

appendWhitespace(textOrWriterFunction: string | WriterFunction): void

Appends the specified whitespace to current node.

asKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the node as the specified kind if it is equal to that kind, otherwise returns undefined.

asKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the node as the specified kind if it is equal to that kind, otherwise throws.

containsRange(pos: number, end: number): boolean

If the node contains the provided range (inclusive).

forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: Node[]) => T | undefined): T | undefined

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.

Gets the child nodes passed to the delegate of node.forEachChild(child => {}) as an array.

forEachDescendant<T>(cbNode: (node: Node, traversal: ForEachDescendantTraversalControl) => T | undefined, cbNodeArray?: (nodes: Node[], traversal: ForEachDescendantTraversalControl) => T | undefined): T | undefined

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.

Gets the descendant nodes passed to the delegate of node.forEachDescendant(descendant => {}) as an array.

forget(): void

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.

formatText(settings?: FormatCodeSettings): void

Formats the node's text using the internal TypeScript formatting API.

Goes up the tree getting all the parents in ascending order.

getChildAtIndex(index: number): Node

Gets the child at the specified index.

getChildAtIndexIfKind<TKind extends SyntaxKind>(index: number, kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the child at the specified index if it's the specified kind or returns undefined.

getChildAtIndexIfKindOrThrow<TKind extends SyntaxKind>(
index: number,
kind: TKind,
message?: string | (() => string),
): KindToNodeMappings[TKind]

Gets the child at the specified index if it's the specified kind or throws an exception.

getChildAtPos(pos: number): Node | undefined

Gets the child at the provided text position, or undefined if not found.

getChildCount(): number

Gets the number of children the node has.

Gets the child indentation level of the current node.

getChildIndentationText(offset?: number): string

Gets the next indentation level text.

getChildIndex(): number

Gets the child index of this node relative to the parent.

Gets all the children of the node.

getChildrenOfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind][]

Gets the children based on a kind.

getChildSyntaxList(): SyntaxList | undefined

Gets the child syntax list if it exists.

getChildSyntaxListOrThrow(message?: string | (() => string)): SyntaxList

Gets the child syntax list or throws if it doesn't exist.

getCombinedModifierFlags(): ts.ModifierFlags

Gets the combined modifier flags.

getDescendantAtPos(pos: number): Node | undefined

Gets the most specific descendant at the provided text position, or undefined if not found.

getDescendantAtStartWithWidth(start: number, width: number): Node | undefined

Gets the most specific descendant at the provided start text position with the specified width, or undefined if not found.

Gets the node's descendants.

getDescendantsOfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind][]

Gets the descendants that match a specified syntax kind.

getDescendantStatements(): (Statement | Expression)[]

Gets the node's descendant statements and any arrow function statement-like expressions (ex. returns the expression 5 in () => 5).

getEnd(): number

Gets the source file text position where the node ends.

Gets the line number of the end of the node.

getFirstAncestor<T extends Node>(condition?: (node: Node) => node is T): T | undefined

Gets the first ancestor that matches the provided condition or returns undefined if not found.

getFirstAncestor(condition?: (node: Node) => boolean): Node | undefined

Gets the first ancestor that matches the provided condition or returns undefined if not found.

getFirstAncestorByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Get the first ancestor by syntax kind.

getFirstAncestorByKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the first ancestor by syntax kind or throws if not found.

getFirstAncestorOrThrow<T extends Node>(condition?: (node: Node) => node is T): T

Gets the first ancestor that matches the provided condition or throws if not found.

getFirstAncestorOrThrow(condition?: (node: Node) => boolean): Node

Gets the first ancestor that matches the provided condition or throws if not found.

getFirstChild<T extends Node>(condition?: (node: Node) => node is T): T | undefined

Gets the first child by a condition.

getFirstChild(condition?: (node: Node) => boolean): Node | undefined

Gets the first child by a condition.

getFirstChildByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the first child by syntax kind.

getFirstChildByKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the first child by syntax kind or throws an error if not found.

getFirstChildIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the first child if it matches the specified syntax kind.

getFirstChildIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the first child if it matches the specified syntax kind or throws an error if not found.

getFirstChildOrThrow<T extends Node>(condition?: (node: Node) => node is T, message?: string | (() => string)): T

Gets the first child by a condition or throws.

getFirstChildOrThrow(condition?: (node: Node) => boolean, message?: string | (() => string)): Node

Gets the first child by a condition or throws.

getFirstDescendant<T extends Node>(condition?: (node: Node) => node is T): T | undefined

Gets the first descendant by a condition.

getFirstDescendant(condition?: (node: Node) => boolean): Node | undefined

Gets the first descendant by a condition.

getFirstDescendantByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the first descendant by syntax kind.

getFirstDescendantByKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the first descendant by syntax kind or throws.

getFirstDescendantOrThrow<T extends Node>(condition?: (node: Node) => node is T, message?: string | (() => string)): T

Gets the first descendant by a condition or throws.

getFirstDescendantOrThrow(condition?: (node: Node) => boolean, message?: string | (() => string)): Node

Gets the first descendant by a condition or throws.

getFlags(): ts.NodeFlags

Gets the node's flags.

getFullStart(): number

Gets the source file text position of the end of the last significant token or the start of the source file.

getFullText(): string

Gets the full text with leading trivia (comments and whitespace).

getFullWidth(): number

Gets the text length of the node with trivia.

Gets the indentation level of the current node.

getIndentationText(offset?: number): string

Gets the indentation text.

getKind(): SyntaxKind

Gets the syntax kind.

getKindName(): string

Gets the syntax kind name.

getLastChild<T extends Node>(condition?: (node: Node) => node is T): T | undefined

Gets the last child by a condition.

getLastChild(condition?: (node: Node) => boolean): Node | undefined

Gets the last child by a condition.

getLastChildByKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the last child by syntax kind.

getLastChildByKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the last child by syntax kind or throws an error if not found.

getLastChildIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the last child if it matches the specified syntax kind.

getLastChildIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the last child if it matches the specified syntax kind or throws an error if not found.

getLastChildOrThrow<T extends Node>(condition?: (node: Node) => node is T, message?: string | (() => string)): T

Gets the last child by a condition or throws.

getLastChildOrThrow(condition?: (node: Node) => boolean, message?: string | (() => string)): Node

Gets the last child by a condition or throws.

Gets the last token of this node. Usually this is a close brace.

getLeadingCommentRanges(): CommentRange[]

Gets the leading comment ranges of the current node.

Gets the node's leading trivia's text length.

getLocal(name: string): Symbol | undefined

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.

getLocalOrThrow(name: string, message?: string | (() => string)): 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.

getLocals(): Symbol[]

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.

getNextSibling<T extends Node>(condition?: (node: Node) => node is T): T | undefined

Gets the next sibling.

getNextSibling(condition?: (node: Node) => boolean): Node | undefined

Gets the next sibling.

getNextSiblingIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the next sibling if it matches the specified kind.

getNextSiblingIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the next sibiling if it matches the specified kind, or throws.

getNextSiblingOrThrow<T extends Node>(condition?: (node: Node) => node is T, message?: string | (() => string)): T

Gets the next sibling or throws.

getNextSiblingOrThrow(condition?: (node: Node) => boolean, message?: string | (() => string)): Node

Gets the next sibling or throws.

Gets the next siblings.

Note: Closest sibling is the zero index.

getNodeProperty<KeyType extends keyof LocalNodeType, LocalNodeType extends ts.Node = NodeType>(propertyName: KeyType): NodePropertyToWrappedType<LocalNodeType, KeyType>

Gets a compiler node property wrapped in a Node.

Gets the first source file text position that is not whitespace taking into account comment nodes and a previous node's trailing trivia.

getParent(): Node<ts.Node> | undefined

Get the node's parent.

getParentIf<T extends Node>(condition: (parent: Node | undefined, node: Node) => parent is T): T | undefined

Gets the parent if it matches a certain condition.

getParentIf(condition: (parent: Node | undefined, node: Node) => boolean): Node | undefined

Gets the parent if it matches a certain condition.

getParentIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the parent if it's a certain syntax kind.

getParentIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the parent if it's a certain syntax kind or throws.

getParentIfOrThrow<T extends Node>(condition: (parent: Node | undefined, node: Node) => parent is T, message?: string | (() => string)): T

Gets the parent if it matches a certain condition or throws.

getParentIfOrThrow(condition: (parent: Node | undefined, node: Node) => boolean, message?: string | (() => string)): Node

Gets the parent if it matches a certain condition or throws.

getParentOrThrow(message?: string | (() => string)): Node<ts.Node>

Gets the parent or throws an error if it doesn't exist.

getParentSyntaxList(): SyntaxList | undefined

Gets the parent if it's a syntax list.

getParentSyntaxListOrThrow(message?: string | (() => string)): SyntaxList

Gets the parent if it's a syntax list or throws an error otherwise.

getParentWhile<T extends Node>(condition: (parent: Node, child: Node) => parent is T): T | undefined

Goes up the parents (ancestors) of the node while a condition is true. Returns undefined if the initial parent doesn't match the condition.

getParentWhile(condition: (parent: Node, child: Node) => boolean): Node | undefined

Goes up the parents (ancestors) of the node while a condition is true. Returns undefined if the initial parent doesn't match the condition.

getParentWhileKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

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.

getParentWhileKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

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.

getParentWhileOrThrow<T extends Node>(condition: (parent: Node, node: Node) => parent is T, message?: string | (() => string)): T

Goes up the parents (ancestors) of the node while a condition is true. Throws if the initial parent doesn't match the condition.

getParentWhileOrThrow(condition: (parent: Node, node: Node) => boolean, message?: string | (() => string)): Node

Goes up the parents (ancestors) of the node while a condition is true. Throws if the initial parent doesn't match the condition.

getPos(): number

Gets the source file text position where the node starts that includes the leading trivia (comments and whitespace).

getPreviousSibling<T extends Node>(condition?: (node: Node) => node is T): T | undefined

Gets the previous sibling.

getPreviousSibling(condition?: (node: Node) => boolean): Node | undefined

Gets the previous sibling.

getPreviousSiblingIfKind<TKind extends SyntaxKind>(kind: TKind): KindToNodeMappings[TKind] | undefined

Gets the previous sibling if it matches the specified kind.

getPreviousSiblingIfKindOrThrow<TKind extends SyntaxKind>(kind: TKind, message?: string | (() => string)): KindToNodeMappings[TKind]

Gets the previous sibiling if it matches the specified kind, or throws.

getPreviousSiblingOrThrow<T extends Node>(condition?: (node: Node) => node is T, message?: string | (() => string)): T

Gets the previous sibling or throws.

getPreviousSiblingOrThrow(condition?: (node: Node) => boolean, message?: string | (() => string)): Node

Gets the previous sibling or throws.

Gets the previous siblings.

Note: Closest sibling is the zero index.

Gets the project.

getSourceFile(): SourceFile

Gets the source file.

getStart(includeJsDocComments?: boolean): number

Gets the source file text position where the node starts that does not include the leading trivia (comments and whitespace).

getStartLineNumber(includeJsDocComments?: boolean): number

Gets the line number at the start of the node.

getStartLinePos(includeJsDocComments?: boolean): number

Gets the position of the start of the line that this node starts on.

getSymbol(): Symbol | undefined

Gets the compiler symbol or undefined if it doesn't exist.

getSymbolOrThrow(message?: string | (() => string)): Symbol

Gets the symbol or throws an error if it doesn't exist.

getSymbolsInScope(meaning: SymbolFlags): Symbol[]

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.

getText(includeJsDocComments?: boolean): string

Gets the text without leading trivia (comments and whitespace).

getText(options: { trimLeadingIndentation?: boolean; includeJsDocComments?: boolean; }): string

Gets the text without leading trivia (comments and whitespace).

getTrailingCommentRanges(): CommentRange[]

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.

getType(): Type

Gets the type of the node.

getWidth(includeJsDocComments?: boolean): number

Gets the text length of the node without trivia.

Gets if this is the first node on the current line.

isInStringAtPos(pos: number): boolean

Gets if the specified position is within a string.

isInSyntaxList(): boolean

Gets if this node is in a syntax list.

isKind<TKind extends SyntaxKind>(kind: TKind): this is KindToNodeMappings[TKind]

Returns if the node is the specified kind.

This is a type guard.

prependWhitespace(textOrWriterFunction: string | WriterFunction): void

Prepends the specified whitespace to current node.

print(options?: PrintNodeOptions): string

Prints the node using the compiler's printer.

replaceWithText(textOrWriterFunction: string | WriterFunction): Node

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.

transform(visitNode: (traversal: TransformTraversalControl) => ts.Node): Node

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.

wasForgotten(): boolean

Gets if the compiler node was forgotten.

This will be true when the compiler node was forgotten or removed.

Static Properties

readonly
isAnyKeyword: (node: Node | undefined) => node is Expression

Gets if the node is an AnyKeyword.

readonly
isArrayBindingPattern: (node: Node | undefined) => node is ArrayBindingPattern

Gets if the node is an ArrayBindingPattern.

readonly
isArrayLiteralExpression: (node: Node | undefined) => node is ArrayLiteralExpression

Gets if the node is an ArrayLiteralExpression.

readonly
isArrowFunction: (node: Node | undefined) => node is ArrowFunction

Gets if the node is an ArrowFunction.

readonly
isAsExpression: (node: Node | undefined) => node is AsExpression

Gets if the node is an AsExpression.

readonly
isAssertClause: (node: Node | undefined) => node is AssertClause

Gets if the node is an AssertClause.

readonly
isAssertEntry: (node: Node | undefined) => node is AssertEntry

Gets if the node is an AssertEntry.

readonly
isAwaitExpression: (node: Node | undefined) => node is AwaitExpression

Gets if the node is an AwaitExpression.

readonly
isBigIntLiteral: (node: Node | undefined) => node is BigIntLiteral

Gets if the node is a BigIntLiteral.

readonly
isBinaryExpression: (node: Node | undefined) => node is BinaryExpression

Gets if the node is a BinaryExpression.

readonly
isBindingElement: (node: Node | undefined) => node is BindingElement

Gets if the node is a BindingElement.

readonly
isBlock: (node: Node | undefined) => node is Block

Gets if the node is a Block.

readonly
isBooleanKeyword: (node: Node | undefined) => node is Expression

Gets if the node is a BooleanKeyword.

readonly
isBreakStatement: (node: Node | undefined) => node is BreakStatement

Gets if the node is a BreakStatement.

readonly
isCallExpression: (node: Node | undefined) => node is CallExpression

Gets if the node is a CallExpression.

readonly
isCaseBlock: (node: Node | undefined) => node is CaseBlock

Gets if the node is a CaseBlock.

readonly
isCaseClause: (node: Node | undefined) => node is CaseClause

Gets if the node is a CaseClause.

readonly
isCatchClause: (node: Node | undefined) => node is CatchClause

Gets if the node is a CatchClause.

readonly
isClassDeclaration: (node: Node | undefined) => node is ClassDeclaration

Gets if the node is a ClassDeclaration.

readonly
isClassExpression: (node: Node | undefined) => node is ClassExpression

Gets if the node is a ClassExpression.

readonly
isClassStaticBlockDeclaration: (node: Node | undefined) => node is ClassStaticBlockDeclaration

Gets if the node is a ClassStaticBlockDeclaration.

readonly
isCommaListExpression: (node: Node | undefined) => node is CommaListExpression

Gets if the node is a CommaListExpression.

readonly
isComputedPropertyName: (node: Node | undefined) => node is ComputedPropertyName

Gets if the node is a ComputedPropertyName.

readonly
isConditionalExpression: (node: Node | undefined) => node is ConditionalExpression

Gets if the node is a ConditionalExpression.

readonly
isContinueStatement: (node: Node | undefined) => node is ContinueStatement

Gets if the node is a ContinueStatement.

readonly
isDebuggerStatement: (node: Node | undefined) => node is DebuggerStatement

Gets if the node is a DebuggerStatement.

readonly
isDecorator: (node: Node | undefined) => node is Decorator

Gets if the node is a Decorator.

readonly
isDefaultClause: (node: Node | undefined) => node is DefaultClause

Gets if the node is a DefaultClause.

readonly
isDeleteExpression: (node: Node | undefined) => node is DeleteExpression

Gets if the node is a DeleteExpression.

readonly
isDoStatement: (node: Node | undefined) => node is DoStatement

Gets if the node is a DoStatement.

readonly
isElementAccessExpression: (node: Node | undefined) => node is ElementAccessExpression

Gets if the node is an ElementAccessExpression.

readonly
isEmptyStatement: (node: Node | undefined) => node is EmptyStatement

Gets if the node is an EmptyStatement.

readonly
isEnumDeclaration: (node: Node | undefined) => node is EnumDeclaration

Gets if the node is an EnumDeclaration.

readonly
isEnumMember: (node: Node | undefined) => node is EnumMember

Gets if the node is an EnumMember.

readonly
isExportAssignment: (node: Node | undefined) => node is ExportAssignment

Gets if the node is an ExportAssignment.

readonly
isExportDeclaration: (node: Node | undefined) => node is ExportDeclaration

Gets if the node is an ExportDeclaration.

readonly
isExportSpecifier: (node: Node | undefined) => node is ExportSpecifier

Gets if the node is an ExportSpecifier.

readonly
isExpressionStatement: (node: Node | undefined) => node is ExpressionStatement

Gets if the node is an ExpressionStatement.

readonly
isExpressionWithTypeArguments: (node: Node | undefined) => node is ExpressionWithTypeArguments

Gets if the node is an ExpressionWithTypeArguments.

readonly
isExternalModuleReference: (node: Node | undefined) => node is ExternalModuleReference

Gets if the node is an ExternalModuleReference.

readonly
isForInStatement: (node: Node | undefined) => node is ForInStatement

Gets if the node is a ForInStatement.

readonly
isForOfStatement: (node: Node | undefined) => node is ForOfStatement

Gets if the node is a ForOfStatement.

readonly
isForStatement: (node: Node | undefined) => node is ForStatement

Gets if the node is a ForStatement.

readonly
isFunctionDeclaration: (node: Node | undefined) => node is FunctionDeclaration

Gets if the node is a FunctionDeclaration.

readonly
isFunctionExpression: (node: Node | undefined) => node is FunctionExpression

Gets if the node is a FunctionExpression.

readonly
isHeritageClause: (node: Node | undefined) => node is HeritageClause

Gets if the node is a HeritageClause.

readonly
isIdentifier: (node: Node | undefined) => node is Identifier

Gets if the node is a Identifier.

readonly
isIfStatement: (node: Node | undefined) => node is IfStatement

Gets if the node is a IfStatement.

readonly
isImportClause: (node: Node | undefined) => node is ImportClause

Gets if the node is a ImportClause.

readonly
isImportDeclaration: (node: Node | undefined) => node is ImportDeclaration

Gets if the node is a ImportDeclaration.

readonly
isImportEqualsDeclaration: (node: Node | undefined) => node is ImportEqualsDeclaration

Gets if the node is a ImportEqualsDeclaration.

readonly
isImportSpecifier: (node: Node | undefined) => node is ImportSpecifier

Gets if the node is a ImportSpecifier.

readonly
isImportTypeAssertionContainer: (node: Node | undefined) => node is ImportTypeAssertionContainer

Gets if the node is a ImportTypeAssertionContainer.

readonly
isInferKeyword: (node: Node | undefined) => node is Node<ts.Token<SyntaxKind.InferKeyword>>

Gets if the node is a InferKeyword.

readonly
isInterfaceDeclaration: (node: Node | undefined) => node is InterfaceDeclaration

Gets if the node is a InterfaceDeclaration.

readonly
isJSDoc: (node: Node | undefined) => node is JSDoc

Gets if the node is a JSDoc.

readonly
isJSDocAllType: (node: Node | undefined) => node is JSDocAllType

Gets if the node is a JSDocAllType.

readonly
isJSDocAugmentsTag: (node: Node | undefined) => node is JSDocAugmentsTag

Gets if the node is a JSDocAugmentsTag.

readonly
isJSDocAuthorTag: (node: Node | undefined) => node is JSDocAuthorTag

Gets if the node is a JSDocAuthorTag.

readonly
isJSDocCallbackTag: (node: Node | undefined) => node is JSDocCallbackTag

Gets if the node is a JSDocCallbackTag.

readonly
isJSDocClassTag: (node: Node | undefined) => node is JSDocClassTag

Gets if the node is a JSDocClassTag.

readonly
isJSDocDeprecatedTag: (node: Node | undefined) => node is JSDocDeprecatedTag

Gets if the node is a JSDocDeprecatedTag.

readonly
isJSDocEnumTag: (node: Node | undefined) => node is JSDocEnumTag

Gets if the node is a JSDocEnumTag.

readonly
isJSDocFunctionType: (node: Node | undefined) => node is JSDocFunctionType

Gets if the node is a JSDocFunctionType.

readonly
isJSDocImplementsTag: (node: Node | undefined) => node is JSDocImplementsTag

Gets if the node is a JSDocImplementsTag.

readonly
isJSDocLinkCode: (node: Node | undefined) => node is JSDocLinkCode

Gets if the node is a JSDocLinkCode.

readonly
isJSDocLinkPlain: (node: Node | undefined) => node is JSDocLinkPlain

Gets if the node is a JSDocLinkPlain.

readonly
isJSDocMemberName: (node: Node | undefined) => node is JSDocMemberName

Gets if the node is a JSDocMemberName.

readonly
isJSDocNamepathType: (node: Node | undefined) => node is JSDocNamepathType

Gets if the node is a JSDocNamepathType.

readonly
isJSDocNameReference: (node: Node | undefined) => node is JSDocNameReference

Gets if the node is a JSDocNameReference.

readonly
isJSDocNonNullableType: (node: Node | undefined) => node is JSDocNonNullableType

Gets if the node is a JSDocNonNullableType.

readonly
isJSDocNullableType: (node: Node | undefined) => node is JSDocNullableType

Gets if the node is a JSDocNullableType.

readonly
isJSDocOptionalType: (node: Node | undefined) => node is JSDocOptionalType

Gets if the node is a JSDocOptionalType.

readonly
isJSDocOverloadTag: (node: Node | undefined) => node is JSDocOverloadTag

Gets if the node is a JSDocOverloadTag.

readonly
isJSDocOverrideTag: (node: Node | undefined) => node is JSDocOverrideTag

Gets if the node is a JSDocOverrideTag.

readonly
isJSDocParameterTag: (node: Node | undefined) => node is JSDocParameterTag

Gets if the node is a JSDocParameterTag.

readonly
isJSDocPrivateTag: (node: Node | undefined) => node is JSDocPrivateTag

Gets if the node is a JSDocPrivateTag.

readonly
isJSDocPropertyTag: (node: Node | undefined) => node is JSDocPropertyTag

Gets if the node is a JSDocPropertyTag.

readonly
isJSDocProtectedTag: (node: Node | undefined) => node is JSDocProtectedTag

Gets if the node is a JSDocProtectedTag.

readonly
isJSDocPublicTag: (node: Node | undefined) => node is JSDocPublicTag

Gets if the node is a JSDocPublicTag.

readonly
isJSDocReadonlyTag: (node: Node | undefined) => node is JSDocReadonlyTag

Gets if the node is a JSDocReadonlyTag.

readonly
isJSDocReturnTag: (node: Node | undefined) => node is JSDocReturnTag

Gets if the node is a JSDocReturnTag.

readonly
isJSDocSatisfiesTag: (node: Node | undefined) => node is JSDocSatisfiesTag

Gets if the node is a JSDocSatisfiesTag.

readonly
isJSDocSeeTag: (node: Node | undefined) => node is JSDocSeeTag

Gets if the node is a JSDocSeeTag.

readonly
isJSDocSignature: (node: Node | undefined) => node is JSDocSignature

Gets if the node is a JSDocSignature.

readonly
isJSDocTemplateTag: (node: Node | undefined) => node is JSDocTemplateTag

Gets if the node is a JSDocTemplateTag.

readonly
isJSDocText: (node: Node | undefined) => node is JSDocText

Gets if the node is a JSDocText.

readonly
isJSDocThisTag: (node: Node | undefined) => node is JSDocThisTag

Gets if the node is a JSDocThisTag.

readonly
isJSDocThrowsTag: (node: Node | undefined) => node is JSDocThrowsTag

Gets if the node is a JSDocThrowsTag.

readonly
isJSDocTypedefTag: (node: Node | undefined) => node is JSDocTypedefTag

Gets if the node is a JSDocTypedefTag.

readonly
isJSDocTypeExpression: (node: Node | undefined) => node is JSDocTypeExpression

Gets if the node is a JSDocTypeExpression.

readonly
isJSDocTypeLiteral: (node: Node | undefined) => node is JSDocTypeLiteral

Gets if the node is a JSDocTypeLiteral.

readonly
isJSDocTypeTag: (node: Node | undefined) => node is JSDocTypeTag

Gets if the node is a JSDocTypeTag.

readonly
isJSDocUnknownType: (node: Node | undefined) => node is JSDocUnknownType

Gets if the node is a JSDocUnknownType.

readonly
isJSDocVariadicType: (node: Node | undefined) => node is JSDocVariadicType

Gets if the node is a JSDocVariadicType.

readonly
isJsxAttribute: (node: Node | undefined) => node is JsxAttribute

Gets if the node is a JsxAttribute.

readonly
isJsxClosingElement: (node: Node | undefined) => node is JsxClosingElement

Gets if the node is a JsxClosingElement.

readonly
isJsxClosingFragment: (node: Node | undefined) => node is JsxClosingFragment

Gets if the node is a JsxClosingFragment.

readonly
isJsxElement: (node: Node | undefined) => node is JsxElement

Gets if the node is a JsxElement.

readonly
isJsxExpression: (node: Node | undefined) => node is JsxExpression

Gets if the node is a JsxExpression.

readonly
isJsxFragment: (node: Node | undefined) => node is JsxFragment

Gets if the node is a JsxFragment.

readonly
isJsxNamespacedName: (node: Node | undefined) => node is JsxNamespacedName

Gets if the node is a JsxNamespacedName.

readonly
isJsxOpeningElement: (node: Node | undefined) => node is JsxOpeningElement

Gets if the node is a JsxOpeningElement.

readonly
isJsxOpeningFragment: (node: Node | undefined) => node is JsxOpeningFragment

Gets if the node is a JsxOpeningFragment.

readonly
isJsxSelfClosingElement: (node: Node | undefined) => node is JsxSelfClosingElement

Gets if the node is a JsxSelfClosingElement.

readonly
isJsxSpreadAttribute: (node: Node | undefined) => node is JsxSpreadAttribute

Gets if the node is a JsxSpreadAttribute.

readonly
isJsxText: (node: Node | undefined) => node is JsxText

Gets if the node is a JsxText.

readonly
isLabeledStatement: (node: Node | undefined) => node is LabeledStatement

Gets if the node is a LabeledStatement.

readonly
isMetaProperty: (node: Node | undefined) => node is MetaProperty

Gets if the node is a MetaProperty.

readonly
isMethodDeclaration: (node: Node | undefined) => node is MethodDeclaration

Gets if the node is a MethodDeclaration.

readonly
isMethodSignature: (node: Node | undefined) => node is MethodSignature

Gets if the node is a MethodSignature.

readonly
isModuleBlock: (node: Node | undefined) => node is ModuleBlock

Gets if the node is a ModuleBlock.

readonly
isModuleDeclaration: (node: Node | undefined) => node is ModuleDeclaration

Gets if the node is a ModuleDeclaration.

readonly
isNamedExports: (node: Node | undefined) => node is NamedExports

Gets if the node is a NamedExports.

readonly
isNamedImports: (node: Node | undefined) => node is NamedImports

Gets if the node is a NamedImports.

readonly
isNamedTupleMember: (node: Node | undefined) => node is NamedTupleMember

Gets if the node is a NamedTupleMember.

readonly
isNamespaceExport: (node: Node | undefined) => node is NamespaceExport

Gets if the node is a NamespaceExport.

readonly
isNamespaceImport: (node: Node | undefined) => node is NamespaceImport

Gets if the node is a NamespaceImport.

readonly
isNeverKeyword: (node: Node | undefined) => node is Node<ts.Token<SyntaxKind.NeverKeyword>>

Gets if the node is a NeverKeyword.

readonly
isNewExpression: (node: Node | undefined) => node is NewExpression

Gets if the node is a NewExpression.

readonly
isNonNullExpression: (node: Node | undefined) => node is NonNullExpression

Gets if the node is a NonNullExpression.

readonly
isNoSubstitutionTemplateLiteral: (node: Node | undefined) => node is NoSubstitutionTemplateLiteral

Gets if the node is a NoSubstitutionTemplateLiteral.

readonly
isNotEmittedStatement: (node: Node | undefined) => node is NotEmittedStatement

Gets if the node is a NotEmittedStatement.

readonly
isNumberKeyword: (node: Node | undefined) => node is Expression

Gets if the node is a NumberKeyword.

readonly
isNumericLiteral: (node: Node | undefined) => node is NumericLiteral

Gets if the node is a NumericLiteral.

readonly
isObjectBindingPattern: (node: Node | undefined) => node is ObjectBindingPattern

Gets if the node is a ObjectBindingPattern.

readonly
isObjectKeyword: (node: Node | undefined) => node is Expression

Gets if the node is a ObjectKeyword.

readonly
isObjectLiteralExpression: (node: Node | undefined) => node is ObjectLiteralExpression

Gets if the node is a ObjectLiteralExpression.

readonly
isOmittedExpression: (node: Node | undefined) => node is OmittedExpression

Gets if the node is a OmittedExpression.

readonly
isParenthesizedExpression: (node: Node | undefined) => node is ParenthesizedExpression

Gets if the node is a ParenthesizedExpression.

readonly
isPartiallyEmittedExpression: (node: Node | undefined) => node is PartiallyEmittedExpression

Gets if the node is a PartiallyEmittedExpression.

readonly
isPostfixUnaryExpression: (node: Node | undefined) => node is PostfixUnaryExpression

Gets if the node is a PostfixUnaryExpression.

readonly
isPrefixUnaryExpression: (node: Node | undefined) => node is PrefixUnaryExpression

Gets if the node is a PrefixUnaryExpression.

readonly
isPrivateIdentifier: (node: Node | undefined) => node is PrivateIdentifier

Gets if the node is a PrivateIdentifier.

readonly
isPropertyAccessExpression: (node: Node | undefined) => node is PropertyAccessExpression

Gets if the node is a PropertyAccessExpression.

readonly
isPropertyAssignment: (node: Node | undefined) => node is PropertyAssignment

Gets if the node is a PropertyAssignment.

readonly
isPropertyDeclaration: (node: Node | undefined) => node is PropertyDeclaration

Gets if the node is a PropertyDeclaration.

readonly
isPropertySignature: (node: Node | undefined) => node is PropertySignature

Gets if the node is a PropertySignature.

readonly
isQualifiedName: (node: Node | undefined) => node is QualifiedName

Gets if the node is a QualifiedName.

readonly
isRegularExpressionLiteral: (node: Node | undefined) => node is RegularExpressionLiteral

Gets if the node is a RegularExpressionLiteral.

readonly
isReturnStatement: (node: Node | undefined) => node is ReturnStatement

Gets if the node is a ReturnStatement.

readonly
isSatisfiesExpression: (node: Node | undefined) => node is SatisfiesExpression

Gets if the node is a SatisfiesExpression.

readonly
isSemicolonToken: (node: Node | undefined) => node is Node<ts.Token<SyntaxKind.SemicolonToken>>

Gets if the node is a SemicolonToken.

readonly
isShorthandPropertyAssignment: (node: Node | undefined) => node is ShorthandPropertyAssignment

Gets if the node is a ShorthandPropertyAssignment.

readonly
isSourceFile: (node: Node | undefined) => node is SourceFile

Gets if the node is a SourceFile.

readonly
isSpreadAssignment: (node: Node | undefined) => node is SpreadAssignment

Gets if the node is a SpreadAssignment.

readonly
isSpreadElement: (node: Node | undefined) => node is SpreadElement

Gets if the node is a SpreadElement.

readonly
isStringKeyword: (node: Node | undefined) => node is Expression

Gets if the node is a StringKeyword.

readonly
isStringLiteral: (node: Node | undefined) => node is StringLiteral

Gets if the node is a StringLiteral.

readonly
isSwitchStatement: (node: Node | undefined) => node is SwitchStatement

Gets if the node is a SwitchStatement.

readonly
isSymbolKeyword: (node: Node | undefined) => node is Expression

Gets if the node is a SymbolKeyword.

readonly
isSyntaxList: (node: Node | undefined) => node is SyntaxList

Gets if the node is a SyntaxList.

readonly
isTaggedTemplateExpression: (node: Node | undefined) => node is TaggedTemplateExpression

Gets if the node is a TaggedTemplateExpression.

readonly
isTemplateExpression: (node: Node | undefined) => node is TemplateExpression

Gets if the node is a TemplateExpression.

readonly
isTemplateHead: (node: Node | undefined) => node is TemplateHead

Gets if the node is a TemplateHead.

readonly
isTemplateMiddle: (node: Node | undefined) => node is TemplateMiddle

Gets if the node is a TemplateMiddle.

readonly
isTemplateSpan: (node: Node | undefined) => node is TemplateSpan

Gets if the node is a TemplateSpan.

readonly
isTemplateTail: (node: Node | undefined) => node is TemplateTail

Gets if the node is a TemplateTail.

readonly
isThrowStatement: (node: Node | undefined) => node is ThrowStatement

Gets if the node is a ThrowStatement.

readonly
isTryStatement: (node: Node | undefined) => node is TryStatement

Gets if the node is a TryStatement.

readonly
isTypeAliasDeclaration: (node: Node | undefined) => node is TypeAliasDeclaration

Gets if the node is a TypeAliasDeclaration.

readonly
isTypeOfExpression: (node: Node | undefined) => node is TypeOfExpression

Gets if the node is a TypeOfExpression.

readonly
isUndefinedKeyword: (node: Node | undefined) => node is Expression

Gets if the node is a UndefinedKeyword.

readonly
isVariableDeclaration: (node: Node | undefined) => node is VariableDeclaration

Gets if the node is a VariableDeclaration.

readonly
isVariableDeclarationList: (node: Node | undefined) => node is VariableDeclarationList

Gets if the node is a VariableDeclarationList.

readonly
isVariableStatement: (node: Node | undefined) => node is VariableStatement

Gets if the node is a VariableStatement.

readonly
isVoidExpression: (node: Node | undefined) => node is VoidExpression

Gets if the node is a VoidExpression.

readonly
isWhileStatement: (node: Node | undefined) => node is WhileStatement

Gets if the node is a WhileStatement.

readonly
isWithStatement: (node: Node | undefined) => node is WithStatement

Gets if the node is a WithStatement.

readonly
isYieldExpression: (node: Node | undefined) => node is YieldExpression

Gets if the node is a YieldExpression.

Static Methods

hasBody<T extends Node>(node: T): node is T & { getBody(): Node; }

Gets if the node has a body.

hasExpression<T extends Node>(node: T): node is T & { getExpression(): Expression; }

Gets if the node has an expression.

hasName<T extends Node>(node: T): node is T & { getName(): string; getNameNode(): Node; }

Gets if the node has a name.

hasStructure<T extends Node>(node: T): node is T & { getStructure(): Structures; }

Gets if the node has a structure.

is<TKind extends keyof KindToNodeMappings>(kind: TKind): (node: Node | undefined) => node is KindToNodeMappings[TKind]

Creates a type guard for syntax kinds.

isAbstractable<T extends Node>(node: T | undefined): node is AbstractableNode & AbstractableNodeExtensionType & T

Gets if the node is an AbstractableNode.

isAmbientable<T extends Node>(node: T | undefined): node is AmbientableNode & AmbientableNodeExtensionType & T

Gets if the node is an AmbientableNode.

isArgumented<T extends Node>(node: T | undefined): node is ArgumentedNode & ArgumentedNodeExtensionType & T

Gets if the node is an ArgumentedNode.

isArrayTypeNode(node: Node | undefined): node is ArrayTypeNode

Gets if the node is an ArrayTypeNode.

isAssertionKeyNamed<T extends Node>(node: T | undefined): node is AssertionKeyNamedNode & AssertionKeyNamedNodeExtensionType & T

Gets if the node is an AssertionKeyNamedNode.

isAsyncable<T extends Node>(node: T | undefined): node is AsyncableNode & AsyncableNodeExtensionType & T

Gets if the node is an AsyncableNode.

isAwaitable<T extends Node>(node: T | undefined): node is AwaitableNode & AwaitableNodeExtensionType & T

Gets if the node is an AwaitableNode.

isBindingNamed<T extends Node>(node: T | undefined): node is BindingNamedNode & BindingNamedNodeExtensionType & T

Gets if the node is a BindingNamedNode.

isBodied<T extends Node>(node: T | undefined): node is BodiedNode & BodiedNodeExtensionType & T

Gets if the node is a BodiedNode.

isBodyable<T extends Node>(node: T | undefined): node is BodyableNode & BodyableNodeExtensionType & T

Gets if the node is a BodyableNode.

isCallSignatureDeclaration(node: Node | undefined): node is CallSignatureDeclaration

Gets if the node is a CallSignatureDeclaration.

isChildOrderable<T extends Node>(node: T | undefined): node is ChildOrderableNode & ChildOrderableNodeExtensionType & T

Gets if the node is a ChildOrderableNode.

isClassLikeDeclarationBase<T extends Node>(node: T | undefined): node is ClassLikeDeclarationBase & ClassLikeDeclarationBaseExtensionType & T

Gets if the node is a ClassLikeDeclarationBase.

isCommentClassElement(node: Node | undefined): node is CommentClassElement

Gets if the provided node is a CommentClassElement.

isCommentEnumMember(node: Node | undefined): node is CommentEnumMember

Gets if the provided node is a CommentEnumMember.

isCommentNode(node: Node | undefined): node is
| CommentStatement
| CommentClassElement
| CommentTypeElement
| CommentObjectLiteralElement
| CommentEnumMember

Gets if the provided node is a comment node.

isCommentObjectLiteralElement(node: Node | undefined): node is CommentObjectLiteralElement

Gets if the provided node is a CommentObjectLiteralElement.

isCommentStatement(node: Node | undefined): node is CommentStatement

Gets if the provided node is a CommentStatement.

isCommentTypeElement(node: Node | undefined): node is CommentTypeElement

Gets if the provided value is a CommentTypeElement.

isConditionalTypeNode(node: Node | undefined): node is ConditionalTypeNode

Gets if the node is a ConditionalTypeNode.

isConstructorDeclaration(node: Node | undefined): node is ConstructorDeclaration

Gets if the node is a ConstructorDeclaration.

isConstructorTypeNode(node: Node | undefined): node is ConstructorTypeNode

Gets if the node is a ConstructorTypeNode.

isConstructSignatureDeclaration(node: Node | undefined): node is ConstructSignatureDeclaration

Gets if the node is a ConstructSignatureDeclaration.

isDecoratable<T extends Node>(node: T | undefined): node is DecoratableNode & DecoratableNodeExtensionType & T

Gets if the node is a DecoratableNode.

isDotDotDotTokenable<T extends Node>(node: T | undefined): node is DotDotDotTokenableNode & DotDotDotTokenableNodeExtensionType & T

Gets if the node is a DotDotDotTokenableNode.

isExclamationTokenable<T extends Node>(node: T | undefined): node is ExclamationTokenableNode & ExclamationTokenableNodeExtensionType & T

Gets if the node is an ExclamationTokenableNode.

isExportable<T extends Node>(node: T | undefined): node is ExportableNode & ExportableNodeExtensionType & T

Gets if the node is an ExportableNode.

isExportGetable<T extends Node>(node: T | undefined): node is ExportGetableNode & ExportGetableNodeExtensionType & T

Gets if the node is an ExportGetableNode.

isExpression(node: Node | undefined): node is Expression

Gets if the node is an Expression.

isExpressionable<T extends Node>(node: T | undefined): node is ExpressionableNode & ExpressionableNodeExtensionType & T

Gets if the node is an ExpressionableNode.

isExpressioned<T extends Node>(node: T | undefined): node is ExpressionedNode & ExpressionedNodeExtensionType & T

Gets if the node is an ExpressionedNode.

isExtendsClauseable<T extends Node>(node: T | undefined): node is ExtendsClauseableNode & ExtendsClauseableNodeExtensionType & T

Gets if the node is an ExtendsClauseableNode.

isFalseLiteral(node: Node | undefined): node is FalseLiteral

Gets if the node is a FalseLiteral.

isFunctionLikeDeclaration<T extends Node>(node: T | undefined): node is FunctionLikeDeclaration & FunctionLikeDeclarationExtensionType & T

Gets if the node is a FunctionLikeDeclaration.

isFunctionTypeNode(node: Node | undefined): node is FunctionTypeNode

Gets if the node is a FunctionTypeNode.

isGeneratorable<T extends Node>(node: T | undefined): node is GeneratorableNode & GeneratorableNodeExtensionType & T

Gets if the node is a GeneratorableNode.

isGetAccessorDeclaration(node: Node | undefined): node is GetAccessorDeclaration

Gets if the node is a GetAccessorDeclaration.

isHeritageClauseable<T extends Node>(node: T | undefined): node is HeritageClauseableNode & HeritageClauseableNodeExtensionType & T

Gets if the node is a HeritageClauseableNode.

isImplementsClauseable<T extends Node>(node: T | undefined): node is ImplementsClauseableNode & ImplementsClauseableNodeExtensionType & T

Gets if the node is a ImplementsClauseableNode.

isImportExpression(node: Node | undefined): node is ImportExpression

Gets if the node is a ImportExpression.

isImportTypeNode(node: Node | undefined): node is ImportTypeNode

Gets if the node is a ImportTypeNode.

isIndexedAccessTypeNode(node: Node | undefined): node is IndexedAccessTypeNode

Gets if the node is a IndexedAccessTypeNode.

isIndexSignatureDeclaration(node: Node | undefined): node is IndexSignatureDeclaration

Gets if the node is a IndexSignatureDeclaration.

isInferTypeNode(node: Node | undefined): node is InferTypeNode

Gets if the node is a InferTypeNode.

isInitializerExpressionable<T extends Node>(node: T | undefined): node is InitializerExpressionableNode & InitializerExpressionableNodeExtensionType & T

Gets if the node is a InitializerExpressionableNode.

isInitializerExpressionGetable<T extends Node>(node: T | undefined): node is InitializerExpressionGetableNode & InitializerExpressionGetableNodeExtensionType & T

Gets if the node is a InitializerExpressionGetableNode.

isIntersectionTypeNode(node: Node | undefined): node is IntersectionTypeNode

Gets if the node is a IntersectionTypeNode.

isIterationStatement(node: Node | undefined): node is IterationStatement

Gets if the node is a IterationStatement.

isJSDocable<T extends Node>(node: T | undefined): node is JSDocableNode & JSDocableNodeExtensionType & T

Gets if the node is a JSDocableNode.

isJSDocPropertyLikeTag<T extends Node>(node: T | undefined): node is JSDocPropertyLikeTag & JSDocPropertyLikeTagExtensionType & T

Gets if the node is a JSDocPropertyLikeTag.

isJSDocTag(node: Node | undefined): node is JSDocTag

Gets if the node is a JSDocTag.

isJSDocType(node: Node | undefined): node is JSDocType

Gets if the node is a JSDocType.

isJSDocTypeExpressionableTag<T extends Node>(node: T | undefined): node is JSDocTypeExpressionableTag & JSDocTypeExpressionableTagExtensionType & T

Gets if the node is a JSDocTypeExpressionableTag.

isJSDocTypeParameteredTag<T extends Node>(node: T | undefined): node is JSDocTypeParameteredTag & JSDocTypeParameteredTagExtensionType & T

Gets if the node is a JSDocTypeParameteredTag.

isJSDocUnknownTag(node: Node | undefined): node is JSDocUnknownTag

Gets if the node is a JSDocUnknownTag.

isJsxAttributed<T extends Node>(node: T | undefined): node is JsxAttributedNode & JsxAttributedNodeExtensionType & T

Gets if the node is a JsxAttributedNode.

isJsxTagNamed<T extends Node>(node: T | undefined): node is JsxTagNamedNode & JsxTagNamedNodeExtensionType & T

Gets if the node is a JsxTagNamedNode.

isLeftHandSideExpression(node: Node | undefined): node is LeftHandSideExpression

Gets if the node is a LeftHandSideExpression.

isLeftHandSideExpressioned<T extends Node>(node: T | undefined): node is LeftHandSideExpressionedNode & LeftHandSideExpressionedNodeExtensionType & T

Gets if the node is a LeftHandSideExpressionedNode.

isLiteralExpression(node: Node | undefined): node is LiteralExpression

Gets if the node is a LiteralExpression.

isLiteralLike<T extends Node>(node: T | undefined): node is LiteralLikeNode & LiteralLikeNodeExtensionType & T

Gets if the node is a LiteralLikeNode.

isLiteralTypeNode(node: Node | undefined): node is LiteralTypeNode

Gets if the node is a LiteralTypeNode.

isMappedTypeNode(node: Node | undefined): node is MappedTypeNode

Gets if the node is a MappedTypeNode.

isMemberExpression(node: Node | undefined): node is MemberExpression

Gets if the node is a MemberExpression.

isModifierable<T extends Node>(node: T | undefined): node is ModifierableNode & ModifierableNodeExtensionType & T

Gets if the node is a ModifierableNode.

isModuleChildable<T extends Node>(node: T | undefined): node is ModuleChildableNode & ModuleChildableNodeExtensionType & T

Gets if the node is a ModuleChildableNode.

isModuled<T extends Node>(node: T | undefined): node is ModuledNode & ModuledNodeExtensionType & T

Gets if the node is a ModuledNode.

isModuleNamed<T extends Node>(node: T | undefined): node is ModuleNamedNode & ModuleNamedNodeExtensionType & T

Gets if the node is a ModuleNamedNode.

isNameable<T extends Node>(node: T | undefined): node is NameableNode & NameableNodeExtensionType & T

Gets if the node is a NameableNode.

isNamed<T extends Node>(node: T | undefined): node is NamedNode & NamedNodeExtensionType & T

Gets if the node is a NamedNode.

isNode(value: unknown): value is Node

Gets if the provided value is a Node.

isNodeWithTypeArguments(node: Node | undefined): node is NodeWithTypeArguments

Gets if the node is a NodeWithTypeArguments.

isNullLiteral(node: Node | undefined): node is NullLiteral

Gets if the node is a NullLiteral.

isOverloadable<T extends Node>(node: T | undefined): node is OverloadableNode & OverloadableNodeExtensionType & T

Gets if the node is a OverloadableNode.

isOverrideable<T extends Node>(node: T | undefined): node is OverrideableNode & OverrideableNodeExtensionType & T

Gets if the node is a OverrideableNode.

isParameterDeclaration(node: Node | undefined): node is ParameterDeclaration

Gets if the node is a ParameterDeclaration.

isParametered<T extends Node>(node: T | undefined): node is ParameteredNode & ParameteredNodeExtensionType & T

Gets if the node is a ParameteredNode.

isParenthesizedTypeNode(node: Node | undefined): node is ParenthesizedTypeNode

Gets if the node is a ParenthesizedTypeNode.

isPrimaryExpression(node: Node | undefined): node is PrimaryExpression

Gets if the node is a PrimaryExpression.

isPropertyNamed<T extends Node>(node: T | undefined): node is PropertyNamedNode & PropertyNamedNodeExtensionType & T

Gets if the node is a PropertyNamedNode.

isQuestionDotTokenable<T extends Node>(node: T | undefined): node is QuestionDotTokenableNode & QuestionDotTokenableNodeExtensionType & T

Gets if the node is a QuestionDotTokenableNode.

isQuestionTokenable<T extends Node>(node: T | undefined): node is QuestionTokenableNode & QuestionTokenableNodeExtensionType & T

Gets if the node is a QuestionTokenableNode.

isReadonlyable<T extends Node>(node: T | undefined): node is ReadonlyableNode & ReadonlyableNodeExtensionType & T

Gets if the node is a ReadonlyableNode.

isReferenceFindable<T extends Node>(node: T | undefined): node is ReferenceFindableNode & ReferenceFindableNodeExtensionType & T

Gets if the node is a ReferenceFindableNode.

isRenameable<T extends Node>(node: T | undefined): node is RenameableNode & RenameableNodeExtensionType & T

Gets if the node is a RenameableNode.

isRestTypeNode(node: Node | undefined): node is RestTypeNode

Gets if the node is a RestTypeNode.

isReturnTyped<T extends Node>(node: T | undefined): node is ReturnTypedNode & ReturnTypedNodeExtensionType & T

Gets if the node is a ReturnTypedNode.

isScopeable<T extends Node>(node: T | undefined): node is ScopeableNode & ScopeableNodeExtensionType & T

Gets if the node is a ScopeableNode.

isScoped<T extends Node>(node: T | undefined): node is ScopedNode & ScopedNodeExtensionType & T

Gets if the node is a ScopedNode.

isSetAccessorDeclaration(node: Node | undefined): node is SetAccessorDeclaration

Gets if the node is a SetAccessorDeclaration.

isSignaturedDeclaration<T extends Node>(node: T | undefined): node is SignaturedDeclaration & SignaturedDeclarationExtensionType & T

Gets if the node is a SignaturedDeclaration.

isStatement(node: Node | undefined): node is Statement

Gets if the node is a Statement.

isStatemented<T extends Node>(node: T | undefined): node is StatementedNode & StatementedNodeExtensionType & T

Gets if the node is a StatementedNode.

isStaticable<T extends Node>(node: T | undefined): node is StaticableNode & StaticableNodeExtensionType & T

Gets if the node is a StaticableNode.

isSuperExpression(node: Node | undefined): node is SuperExpression

Gets if the node is a SuperExpression.

isTemplateLiteralTypeNode(node: Node | undefined): node is TemplateLiteralTypeNode

Gets if the node is a TemplateLiteralTypeNode.

isTextInsertable<T extends Node>(node: T | undefined): node is TextInsertableNode & TextInsertableNodeExtensionType & T

Gets if the node is a TextInsertableNode.

isThisExpression(node: Node | undefined): node is ThisExpression

Gets if the node is a ThisExpression.

isThisTypeNode(node: Node | undefined): node is ThisTypeNode

Gets if the node is a ThisTypeNode.

isTrueLiteral(node: Node | undefined): node is TrueLiteral

Gets if the node is a TrueLiteral.

isTupleTypeNode(node: Node | undefined): node is TupleTypeNode

Gets if the node is a TupleTypeNode.

isTypeArgumented<T extends Node>(node: T | undefined): node is TypeArgumentedNode & TypeArgumentedNodeExtensionType & T

Gets if the node is a TypeArgumentedNode.

isTypeAssertion(node: Node | undefined): node is TypeAssertion

Gets if the node is a TypeAssertion.

isTyped<T extends Node>(node: T | undefined): node is TypedNode & TypedNodeExtensionType & T

Gets if the node is a TypedNode.

isTypeElement(node: Node | undefined): node is TypeElement

Gets if the node is a TypeElement.

isTypeElementMembered<T extends Node>(node: T | undefined): node is TypeElementMemberedNode & TypeElementMemberedNodeExtensionType & T

Gets if the node is a TypeElementMemberedNode.

isTypeLiteral(node: Node | undefined): node is TypeLiteralNode

Gets if the node is a TypeLiteralNode.

isTypeNode(node: Node | undefined): node is TypeNode

Gets if the node is a TypeNode.

isTypeOperatorTypeNode(node: Node | undefined): node is TypeOperatorTypeNode

Gets if the node is a TypeOperatorTypeNode.

isTypeParameterDeclaration(node: Node | undefined): node is TypeParameterDeclaration

Gets if the node is a TypeParameterDeclaration.

isTypeParametered<T extends Node>(node: T | undefined): node is TypeParameteredNode & TypeParameteredNodeExtensionType & T

Gets if the node is a TypeParameteredNode.

isTypePredicate(node: Node | undefined): node is TypePredicateNode

Gets if the node is a TypePredicateNode.

isTypeQuery(node: Node | undefined): node is TypeQueryNode

Gets if the node is a TypeQueryNode.

isTypeReference(node: Node | undefined): node is TypeReferenceNode

Gets if the node is a TypeReferenceNode.

isUnaryExpression(node: Node | undefined): node is UnaryExpression

Gets if the node is a UnaryExpression.

isUnaryExpressioned<T extends Node>(node: T | undefined): node is UnaryExpressionedNode & UnaryExpressionedNodeExtensionType & T

Gets if the node is a UnaryExpressionedNode.

isUnionTypeNode(node: Node | undefined): node is UnionTypeNode

Gets if the node is a UnionTypeNode.

isUnwrappable<T extends Node>(node: T | undefined): node is UnwrappableNode & UnwrappableNodeExtensionType & T

Gets if the node is a UnwrappableNode.

isUpdateExpression(node: Node | undefined): node is UpdateExpression

Gets if the node is a UpdateExpression.