ast

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModifierFlagsNone ModifierFlags = 0
	// Syntactic/JSDoc modifiers
	ModifierFlagsPublic    ModifierFlags = 1 << 0 // Property/Method
	ModifierFlagsPrivate   ModifierFlags = 1 << 1 // Property/Method
	ModifierFlagsProtected ModifierFlags = 1 << 2 // Property/Method
	ModifierFlagsReadonly  ModifierFlags = 1 << 3 // Property/Method
	ModifierFlagsOverride  ModifierFlags = 1 << 4 // Override method
	// Syntactic-only modifiers
	ModifierFlagsExport    ModifierFlags = 1 << 5  // Declarations
	ModifierFlagsAbstract  ModifierFlags = 1 << 6  // Class/Method/ConstructSignature
	ModifierFlagsAmbient   ModifierFlags = 1 << 7  // Declarations
	ModifierFlagsStatic    ModifierFlags = 1 << 8  // Property/Method
	ModifierFlagsAccessor  ModifierFlags = 1 << 9  // Property
	ModifierFlagsAsync     ModifierFlags = 1 << 10 // Property/Method/Function
	ModifierFlagsDefault   ModifierFlags = 1 << 11 // Function/Class (export default declaration)
	ModifierFlagsConst     ModifierFlags = 1 << 12 // Const enum
	ModifierFlagsIn        ModifierFlags = 1 << 13 // Contravariance modifier
	ModifierFlagsOut       ModifierFlags = 1 << 14 // Covariance modifier
	ModifierFlagsDecorator ModifierFlags = 1 << 15 // Contains a decorator.
	ModifierFlagsImmediate ModifierFlags = 1 << 16 // Parameter
	// JSDoc-only modifiers
	ModifierFlagsDeprecated     ModifierFlags = 1 << 17 // Deprecated tag.
	ModifierFlagsJSDocImmediate ModifierFlags = 1 << 18 // Parameter
	// Cache-only JSDoc-modifiers. Should match order of Syntactic/JSDoc modifiers, above.
	ModifierFlagsJSDocPublic               ModifierFlags = 1 << 23 // if this value changes, `selectEffectiveModifierFlags` must change accordingly
	ModifierFlagsJSDocPrivate              ModifierFlags = 1 << 24
	ModifierFlagsJSDocProtected            ModifierFlags = 1 << 25
	ModifierFlagsJSDocReadonly             ModifierFlags = 1 << 26
	ModifierFlagsJSDocOverride             ModifierFlags = 1 << 27
	ModifierFlagsHasComputedJSDocModifiers ModifierFlags = 1 << 28 // Indicates the computed modifier flags include modifiers from JSDoc.
	ModifierFlagsHasComputedFlags          ModifierFlags = 1 << 29 // Modifier flags have been computed

	ModifierFlagsSyntacticOrJSDocModifiers = ModifierFlagsPublic | ModifierFlagsPrivate | ModifierFlagsProtected | ModifierFlagsReadonly | ModifierFlagsOverride
	ModifierFlagsSyntacticOnlyModifiers    = ModifierFlagsExport | ModifierFlagsAmbient | ModifierFlagsAbstract | ModifierFlagsStatic | ModifierFlagsAccessor | ModifierFlagsAsync | ModifierFlagsDefault | ModifierFlagsConst | ModifierFlagsIn | ModifierFlagsOut | ModifierFlagsDecorator | ModifierFlagsImmediate
	ModifierFlagsSyntacticModifiers        = ModifierFlagsSyntacticOrJSDocModifiers | ModifierFlagsSyntacticOnlyModifiers
	ModifierFlagsJSDocCacheOnlyModifiers   = ModifierFlagsJSDocPublic | ModifierFlagsJSDocPrivate | ModifierFlagsJSDocProtected | ModifierFlagsJSDocReadonly | ModifierFlagsJSDocOverride
	ModifierFlagsJSDocOnlyModifiers        = ModifierFlagsDeprecated | ModifierFlagsJSDocImmediate
	ModifierFlagsNonCacheOnlyModifiers     = ModifierFlagsSyntacticOrJSDocModifiers | ModifierFlagsSyntacticOnlyModifiers | ModifierFlagsJSDocOnlyModifiers

	ModifierFlagsAccessibilityModifier = ModifierFlagsPublic | ModifierFlagsPrivate | ModifierFlagsProtected
	// Accessibility modifiers and 'readonly' can be attached to a parameter in a constructor to make it a property.
	ModifierFlagsParameterPropertyModifier      = ModifierFlagsAccessibilityModifier | ModifierFlagsReadonly | ModifierFlagsOverride
	ModifierFlagsNonPublicAccessibilityModifier = ModifierFlagsPrivate | ModifierFlagsProtected

	ModifierFlagsTypeScriptModifier = ModifierFlagsAmbient | ModifierFlagsPublic | ModifierFlagsPrivate | ModifierFlagsProtected | ModifierFlagsReadonly | ModifierFlagsAbstract | ModifierFlagsConst | ModifierFlagsOverride | ModifierFlagsIn | ModifierFlagsOut | ModifierFlagsImmediate
	ModifierFlagsExportDefault      = ModifierFlagsExport | ModifierFlagsDefault
	ModifierFlagsAll                = ModifierFlagsExport | ModifierFlagsAmbient | ModifierFlagsPublic | ModifierFlagsPrivate | ModifierFlagsProtected | ModifierFlagsStatic | ModifierFlagsReadonly | ModifierFlagsAbstract | ModifierFlagsAccessor | ModifierFlagsAsync | ModifierFlagsDefault | ModifierFlagsConst | ModifierFlagsDeprecated | ModifierFlagsOverride | ModifierFlagsIn | ModifierFlagsOut | ModifierFlagsImmediate | ModifierFlagsDecorator
	ModifierFlagsModifier           = ModifierFlagsAll & ^ModifierFlagsDecorator
)
View Source
const (
	InternalSymbolNameCall                    = InternalSymbolNamePrefix + "call"                    // Call signatures
	InternalSymbolNameConstructor             = InternalSymbolNamePrefix + "constructor"             // Constructor implementations
	InternalSymbolNameNew                     = InternalSymbolNamePrefix + "new"                     // Constructor signatures
	InternalSymbolNameIndex                   = InternalSymbolNamePrefix + "index"                   // Index signatures
	InternalSymbolNameExportStar              = InternalSymbolNamePrefix + "export"                  // Module export * declarations
	InternalSymbolNameGlobal                  = InternalSymbolNamePrefix + "global"                  // Global self-reference
	InternalSymbolNameMissing                 = InternalSymbolNamePrefix + "missing"                 // Indicates missing symbol
	InternalSymbolNameType                    = InternalSymbolNamePrefix + "type"                    // Anonymous type literal symbol
	InternalSymbolNameObject                  = InternalSymbolNamePrefix + "object"                  // Anonymous object literal declaration
	InternalSymbolNameJSXAttributes           = InternalSymbolNamePrefix + "jsxAttributes"           // Anonymous JSX attributes object literal declaration
	InternalSymbolNameClass                   = InternalSymbolNamePrefix + "class"                   // Unnamed class expression
	InternalSymbolNameFunction                = InternalSymbolNamePrefix + "function"                // Unnamed function expression
	InternalSymbolNameComputed                = InternalSymbolNamePrefix + "computed"                // Computed property name declaration with dynamic name
	InternalSymbolNameResolving               = InternalSymbolNamePrefix + "resolving"               // Indicator symbol used to mark partially resolved type aliases
	InternalSymbolNameInstantiationExpression = InternalSymbolNamePrefix + "instantiationExpression" // Instantiation expressions
	InternalSymbolNameImportAttributes        = InternalSymbolNamePrefix + "importAttributes"
	InternalSymbolNameExportEquals            = "export=" // Export assignment symbol
	InternalSymbolNameDefault                 = "default" // Default export symbol (technically not wholly internal, but included here for usability)
	InternalSymbolNameThis                    = "this"
)
View Source
const (
	SymbolFlagsNone                   SymbolFlags = 0
	SymbolFlagsFunctionScopedVariable SymbolFlags = 1 << 0  // Variable (var) or parameter
	SymbolFlagsBlockScopedVariable    SymbolFlags = 1 << 1  // A block-scoped variable (let or const)
	SymbolFlagsProperty               SymbolFlags = 1 << 2  // Property or enum member
	SymbolFlagsEnumMember             SymbolFlags = 1 << 3  // Enum member
	SymbolFlagsFunction               SymbolFlags = 1 << 4  // Function
	SymbolFlagsClass                  SymbolFlags = 1 << 5  // Class
	SymbolFlagsInterface              SymbolFlags = 1 << 6  // Interface
	SymbolFlagsConstEnum              SymbolFlags = 1 << 7  // Const enum
	SymbolFlagsRegularEnum            SymbolFlags = 1 << 8  // Enum
	SymbolFlagsValueModule            SymbolFlags = 1 << 9  // Instantiated module
	SymbolFlagsNamespaceModule        SymbolFlags = 1 << 10 // Uninstantiated module
	SymbolFlagsTypeLiteral            SymbolFlags = 1 << 11 // Type Literal or mapped type
	SymbolFlagsObjectLiteral          SymbolFlags = 1 << 12 // Object Literal
	SymbolFlagsMethod                 SymbolFlags = 1 << 13 // Method
	SymbolFlagsConstructor            SymbolFlags = 1 << 14 // Constructor
	SymbolFlagsGetAccessor            SymbolFlags = 1 << 15 // Get accessor
	SymbolFlagsSetAccessor            SymbolFlags = 1 << 16 // Set accessor
	SymbolFlagsSignature              SymbolFlags = 1 << 17 // Call, construct, or index signature
	SymbolFlagsTypeParameter          SymbolFlags = 1 << 18 // Type parameter
	SymbolFlagsTypeAlias              SymbolFlags = 1 << 19 // Type alias
	SymbolFlagsExportValue            SymbolFlags = 1 << 20 // Exported value marker (see comment in declareModuleMember in binder)
	SymbolFlagsAlias                  SymbolFlags = 1 << 21 // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker)
	SymbolFlagsPrototype              SymbolFlags = 1 << 22 // Prototype property (no source representation)
	SymbolFlagsExportStar             SymbolFlags = 1 << 23 // Export * declaration
	SymbolFlagsOptional               SymbolFlags = 1 << 24 // Optional property
	SymbolFlagsTransient              SymbolFlags = 1 << 25 // Transient symbol (created during type check)
	SymbolFlagsAssignment             SymbolFlags = 1 << 26 // Assignment to property on function acting as declaration (eg `func.prop = 1`)
	SymbolFlagsModuleExports          SymbolFlags = 1 << 27 // Symbol for CommonJS `module` of `module.exports`
	SymbolFlagsConstEnumOnlyModule    SymbolFlags = 1 << 28 // Module contains only const enums or other modules with only const enums
	SymbolFlagsReplaceableByMethod    SymbolFlags = 1 << 29
	SymbolFlagsGlobalLookup           SymbolFlags = 1 << 30   // Flag to signal this is a global lookup
	SymbolFlagsAll                    SymbolFlags = 1<<30 - 1 // All flags except SymbolFlagsGlobalLookup

	SymbolFlagsEnum      = SymbolFlagsRegularEnum | SymbolFlagsConstEnum
	SymbolFlagsVariable  = SymbolFlagsFunctionScopedVariable | SymbolFlagsBlockScopedVariable
	SymbolFlagsValue     = SymbolFlagsVariable | SymbolFlagsProperty | SymbolFlagsEnumMember | SymbolFlagsObjectLiteral | SymbolFlagsFunction | SymbolFlagsClass | SymbolFlagsEnum | SymbolFlagsValueModule | SymbolFlagsMethod | SymbolFlagsGetAccessor | SymbolFlagsSetAccessor
	SymbolFlagsType      = SymbolFlagsClass | SymbolFlagsInterface | SymbolFlagsEnum | SymbolFlagsEnumMember | SymbolFlagsTypeLiteral | SymbolFlagsTypeParameter | SymbolFlagsTypeAlias
	SymbolFlagsNamespace = SymbolFlagsValueModule | SymbolFlagsNamespaceModule | SymbolFlagsEnum
	SymbolFlagsModule    = SymbolFlagsValueModule | SymbolFlagsNamespaceModule
	SymbolFlagsAccessor  = SymbolFlagsGetAccessor | SymbolFlagsSetAccessor

	// Variables can be redeclared, but can not redeclare a block-scoped declaration with the
	// same name, or any other value that is not a variable, e.g. ValueModule or Class
	SymbolFlagsFunctionScopedVariableExcludes = SymbolFlagsValue & ^SymbolFlagsFunctionScopedVariable

	// Block-scoped declarations are not allowed to be re-declared
	// they can not merge with anything in the value space
	SymbolFlagsBlockScopedVariableExcludes = SymbolFlagsValue

	SymbolFlagsParameterExcludes                   = SymbolFlagsValue
	SymbolFlagsPropertyExcludes                    = SymbolFlagsValue & ^SymbolFlagsProperty
	SymbolFlagsEnumMemberExcludes                  = SymbolFlagsValue | SymbolFlagsType
	SymbolFlagsFunctionExcludes                    = SymbolFlagsValue & ^(SymbolFlagsFunction | SymbolFlagsValueModule | SymbolFlagsClass)
	SymbolFlagsClassExcludes                       = (SymbolFlagsValue | SymbolFlagsType) & ^(SymbolFlagsValueModule | SymbolFlagsInterface | SymbolFlagsFunction) // class-interface mergability done in checker.ts
	SymbolFlagsInterfaceExcludes                   = SymbolFlagsType & ^(SymbolFlagsInterface | SymbolFlagsClass)
	SymbolFlagsRegularEnumExcludes                 = (SymbolFlagsValue | SymbolFlagsType) & ^(SymbolFlagsRegularEnum | SymbolFlagsValueModule) // regular enums merge only with regular enums and modules
	SymbolFlagsConstEnumExcludes                   = (SymbolFlagsValue | SymbolFlagsType) & ^SymbolFlagsConstEnum                              // const enums merge only with const enums
	SymbolFlagsValueModuleExcludes                 = SymbolFlagsValue & ^(SymbolFlagsFunction | SymbolFlagsClass | SymbolFlagsRegularEnum | SymbolFlagsValueModule)
	SymbolFlagsNamespaceModuleExcludes             = SymbolFlagsNone
	SymbolFlagsMethodExcludes                      = SymbolFlagsValue & ^SymbolFlagsMethod
	SymbolFlagsGetAccessorExcludes                 = SymbolFlagsValue & ^SymbolFlagsSetAccessor
	SymbolFlagsSetAccessorExcludes                 = SymbolFlagsValue & ^SymbolFlagsGetAccessor
	SymbolFlagsAccessorExcludes                    = SymbolFlagsValue & ^SymbolFlagsAccessor
	SymbolFlagsTypeParameterExcludes               = SymbolFlagsType & ^SymbolFlagsTypeParameter
	SymbolFlagsTypeAliasExcludes                   = SymbolFlagsType
	SymbolFlagsAliasExcludes                       = SymbolFlagsAlias
	SymbolFlagsModuleMember                        = SymbolFlagsVariable | SymbolFlagsFunction | SymbolFlagsClass | SymbolFlagsInterface | SymbolFlagsEnum | SymbolFlagsModule | SymbolFlagsTypeAlias | SymbolFlagsAlias
	SymbolFlagsExportHasLocal                      = SymbolFlagsFunction | SymbolFlagsClass | SymbolFlagsEnum | SymbolFlagsValueModule
	SymbolFlagsBlockScoped                         = SymbolFlagsBlockScopedVariable | SymbolFlagsClass | SymbolFlagsEnum
	SymbolFlagsPropertyOrAccessor                  = SymbolFlagsProperty | SymbolFlagsAccessor
	SymbolFlagsClassMember                         = SymbolFlagsMethod | SymbolFlagsAccessor | SymbolFlagsProperty
	SymbolFlagsExportSupportsDefaultModifier       = SymbolFlagsClass | SymbolFlagsFunction | SymbolFlagsInterface
	SymbolFlagsExportDoesNotSupportDefaultModifier = ^SymbolFlagsExportSupportsDefaultModifier
	// The set of things we consider semantically classifiable.  Used to speed up the LS during
	// classification.
	SymbolFlagsClassifiable         = SymbolFlagsClass | SymbolFlagsEnum | SymbolFlagsTypeAlias | SymbolFlagsInterface | SymbolFlagsTypeParameter | SymbolFlagsModule | SymbolFlagsAlias
	SymbolFlagsLateBindingContainer = SymbolFlagsClass | SymbolFlagsInterface | SymbolFlagsTypeLiteral | SymbolFlagsObjectLiteral | SymbolFlagsFunction
)
View Source
const (
	OEKParentheses                  OuterExpressionKinds = 1 << 0
	OEKTypeAssertions               OuterExpressionKinds = 1 << 1
	OEKNonNullAssertions            OuterExpressionKinds = 1 << 2
	OEKPartiallyEmittedExpressions  OuterExpressionKinds = 1 << 3
	OEKExpressionsWithTypeArguments OuterExpressionKinds = 1 << 4
	OEKExcludeJSDocTypeAssertion                         = 1 << 5
	OEKAssertions                                        = OEKTypeAssertions | OEKNonNullAssertions
	OEKAll                                               = OEKParentheses | OEKAssertions | OEKPartiallyEmittedExpressions | OEKExpressionsWithTypeArguments
)
View Source
const InternalSymbolNamePrefix = "\xFE" // Invalid UTF8 sequence, will never occur as IdentifierName

Variables

This section is empty.

Functions

func CanHaveDecorators

func CanHaveDecorators(node *Node) bool

func CanHaveIllegalDecorators

func CanHaveIllegalDecorators(node *Node) bool

func CanHaveIllegalModifiers

func CanHaveIllegalModifiers(node *Node) bool

func CanHaveModifiers

func CanHaveModifiers(node *Node) bool

func CompareDiagnostics

func CompareDiagnostics(d1, d2 *Diagnostic) int

func EqualDiagnostics

func EqualDiagnostics(d1, d2 *Diagnostic) bool

func ExportAssignmentIsAlias

func ExportAssignmentIsAlias(node *Node) bool

func ForEachDynamicImportOrRequireCall

func ForEachDynamicImportOrRequireCall(
	file *SourceFile,
	includeTypeSpaceImports bool,
	requireStringLiteralLikeArgument bool,
	cb func(node *Node, argument *Expression) bool,
) bool

func ForEachReturnStatement

func ForEachReturnStatement(body *Node, visitor func(stmt *Node) bool) bool

Warning: This has the same semantics as the forEach family of functions in that traversal terminates in the event that 'visitor' returns true.

func GetElementOrPropertyAccessName

func GetElementOrPropertyAccessName(node *Node) string

func GetEmitModuleFormatOfFileWorker

func GetEmitModuleFormatOfFileWorker(sourceFile *SourceFile, options *core.CompilerOptions) core.ModuleKind

func GetImpliedNodeFormatForEmitWorker

func GetImpliedNodeFormatForEmitWorker(sourceFile *SourceFile, options *core.CompilerOptions) core.ResolutionMode

func GetTextOfPropertyName

func GetTextOfPropertyName(name *Node) string

func HasAccessorModifier

func HasAccessorModifier(node *Node) bool

func HasDynamicName

func HasDynamicName(declaration *Node) bool

*

  • A declaration has a dynamic name if all of the following are true:
  • 1. The declaration has a computed property name.
  • 2. The computed name is *not* expressed as a StringLiteral.
  • 3. The computed name is *not* expressed as a NumericLiteral.
  • 4. The computed name is *not* expressed as a PlusToken or MinusToken
  • immediately followed by a NumericLiteral.

func HasStaticModifier

func HasStaticModifier(node *Node) bool

func HasSyntacticModifier

func HasSyntacticModifier(node *Node, flags ModifierFlags) bool

func IsAccessExpression

func IsAccessExpression(node *Node) bool

Determines if a node is a property or element access expression

func IsAccessor

func IsAccessor(node *Node) bool

func IsAliasSymbolDeclaration

func IsAliasSymbolDeclaration(node *Node) bool

An alias symbol is created by one of the following declarations:

import <symbol> = ...
import <symbol> from ...
import * as <symbol> from ...
import { x as <symbol> } from ...
export { x as <symbol> } from ...
export * as ns <symbol> from ...
export = <EntityNameExpression>
export default <EntityNameExpression>

func IsAmbientModule

func IsAmbientModule(node *Node) bool

func IsAnyImportOrReExport

func IsAnyImportOrReExport(node *Node) bool

func IsAnyImportSyntax

func IsAnyImportSyntax(node *Node) bool

func IsArrayBindingPattern

func IsArrayBindingPattern(node *Node) bool

func IsArrayLiteralExpression

func IsArrayLiteralExpression(node *Node) bool

func IsArrowFunction

func IsArrowFunction(node *Node) bool

func IsAssertionExpression

func IsAssertionExpression(node *Node) bool

func IsAssignmentExpression

func IsAssignmentExpression(node *Node, excludeCompoundAssignment bool) bool

func IsAssignmentOperator

func IsAssignmentOperator(token Kind) bool

func IsAssignmentTarget

func IsAssignmentTarget(node *Node) bool

A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property assignment in an object literal that is an assignment target, or if it is parented by an array literal that is an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ a }] = xxx'. (Note that `p` is not a target in the above examples, only `a`.)

func IsAutoAccessorPropertyDeclaration

func IsAutoAccessorPropertyDeclaration(node *Node) bool

func IsAwaitExpression

func IsAwaitExpression(node *Node) bool

func IsBigIntLiteral

func IsBigIntLiteral(node *Node) bool

func IsBinaryExpression

func IsBinaryExpression(node *Node) bool

func IsBindingElement

func IsBindingElement(node *Node) bool

func IsBindingPattern

func IsBindingPattern(node *Node) bool

func IsBlock

func IsBlock(node *Node) bool

func IsBlockOrCatchScoped

func IsBlockOrCatchScoped(declaration *Node) bool

func IsBlockScope

func IsBlockScope(node *Node, parentNode *Node) bool

func IsBooleanLiteral

func IsBooleanLiteral(node *Node) bool

func IsBreakOrContinueStatement

func IsBreakOrContinueStatement(node *Node) bool

func IsCallExpression

func IsCallExpression(node *Node) bool

func IsCallSignatureDeclaration

func IsCallSignatureDeclaration(node *Node) bool

func IsCaseClause

func IsCaseClause(node *Node) bool

func IsCatchClause

func IsCatchClause(node *Node) bool

func IsCatchClauseVariableDeclarationOrBindingElement

func IsCatchClauseVariableDeclarationOrBindingElement(declaration *Node) bool

func IsClassDeclaration

func IsClassDeclaration(node *Node) bool

func IsClassElement

func IsClassElement(node *Node) bool

func IsClassExpression

func IsClassExpression(node *Node) bool

func IsClassLike

func IsClassLike(node *Node) bool

func IsClassStaticBlockDeclaration

func IsClassStaticBlockDeclaration(node *Node) bool

func IsCommaExpression

func IsCommaExpression(node *Node) bool

func IsCommaSequence

func IsCommaSequence(node *Node) bool

func IsComputedNonLiteralName

func IsComputedNonLiteralName(name *Node) bool

func IsComputedPropertyName

func IsComputedPropertyName(node *Node) bool

func IsConditionalTypeNode

func IsConditionalTypeNode(node *Node) bool

func IsConstAssertion

func IsConstAssertion(node *Node) bool

func IsConstTypeReference

func IsConstTypeReference(node *Node) bool

func IsConstructSignatureDeclaration

func IsConstructSignatureDeclaration(node *Node) bool

func IsConstructorDeclaration

func IsConstructorDeclaration(node *Node) bool

func IsConstructorTypeNode

func IsConstructorTypeNode(node *Node) bool

func IsDeclaration

func IsDeclaration(node *Node) bool

func IsDeclarationName

func IsDeclarationName(name *Node) bool

True if `name` is the name of a declaration node

func IsDeclarationNameOrImportPropertyName

func IsDeclarationNameOrImportPropertyName(name *Node) bool

Like 'isDeclarationName', but returns true for LHS of `import { x as y }` or `export { x as y }`.

func IsDeclarationNode

func IsDeclarationNode(node *Node) bool

func IsDeclarationStatement

func IsDeclarationStatement(node *Node) bool

Determines whether a node is a DeclarationStatement. Ideally this does not use Parent pointers, but it may use them to rule out a Block node that is part of `try` or `catch` or is the Block-like body of a function.

NOTE: ECMA262 would just call this a Declaration

func IsDecorator

func IsDecorator(node *Node) bool

func IsDefaultClause

func IsDefaultClause(node *Node) bool

func IsDefaultImport

func IsDefaultImport(node *Node) bool

func IsDestructuringAssignment

func IsDestructuringAssignment(node *Node) bool

func IsDottedName

func IsDottedName(node *Node) bool

func IsDynamicName

func IsDynamicName(name *Node) bool

func IsEffectiveExternalModule

func IsEffectiveExternalModule(node *SourceFile, compilerOptions *core.CompilerOptions) bool

TODO: Should we deprecate `IsExternalOrCommonJsModule` in favor of this function?

func IsEffectiveExternalModuleWorker

func IsEffectiveExternalModuleWorker(node *SourceFile, moduleKind core.ModuleKind) bool

func IsElementAccessExpression

func IsElementAccessExpression(node *Node) bool

func IsEmptyStatement

func IsEmptyStatement(node *Node) bool

func IsEntityName

func IsEntityName(node *Node) bool

func IsEntityNameExpression

func IsEntityNameExpression(node *Node) bool

func IsEnumConst

func IsEnumConst(node *Node) bool

func IsEnumDeclaration

func IsEnumDeclaration(node *Node) bool

func IsEnumMember

func IsEnumMember(node *Node) bool

func IsExportAssignment

func IsExportAssignment(node *Node) bool

func IsExportDeclaration

func IsExportDeclaration(node *Node) bool

func IsExportNamespaceAsDefaultDeclaration

func IsExportNamespaceAsDefaultDeclaration(node *Node) bool

func IsExportSpecifier

func IsExportSpecifier(node *Node) bool

func IsExportsIdentifier

func IsExportsIdentifier(node *Node) bool

func IsExpression

func IsExpression(node *Node) bool

Determines whether a node is an expression based only on its kind.

func IsExpressionNode

func IsExpressionNode(node *Node) bool

func IsExpressionOfOptionalChainRoot

func IsExpressionOfOptionalChainRoot(node *Node) bool

Determines whether a node is the expression preceding an optional chain (i.e. `a` in `a?.b`).

func IsExpressionStatement

func IsExpressionStatement(node *Node) bool

func IsExpressionWithTypeArguments

func IsExpressionWithTypeArguments(node *Node) bool

func IsExpressionWithTypeArgumentsInClassExtendsClause

func IsExpressionWithTypeArgumentsInClassExtendsClause(node *Node) bool

func IsExternalModule

func IsExternalModule(file *SourceFile) bool

func IsExternalModuleImportEqualsDeclaration

func IsExternalModuleImportEqualsDeclaration(node *Node) bool

func IsExternalModuleIndicator

func IsExternalModuleIndicator(node *Statement) bool

func IsExternalModuleReference

func IsExternalModuleReference(node *Node) bool

func IsExternalOrCommonJsModule

func IsExternalOrCommonJsModule(file *SourceFile) bool

func IsForInOrOfStatement

func IsForInOrOfStatement(node *Node) bool

func IsForInStatement

func IsForInStatement(node *Node) bool

func IsForOfStatement

func IsForOfStatement(node *Node) bool

func IsForStatement

func IsForStatement(node *Node) bool

func IsFunctionBlock

func IsFunctionBlock(node *Node) bool

Determines whether a node is the Block-like body of a function by walking the parent of the node

func IsFunctionDeclaration

func IsFunctionDeclaration(node *Node) bool

func IsFunctionExpression

func IsFunctionExpression(node *Node) bool

func IsFunctionExpressionOrArrowFunction

func IsFunctionExpressionOrArrowFunction(node *Node) bool

func IsFunctionLike

func IsFunctionLike(node *Node) bool

Determines if a node is function- or signature-like.

func IsFunctionLikeDeclaration

func IsFunctionLikeDeclaration(node *Node) bool

Determines if a node is function-like (but is not a signature declaration)

func IsFunctionLikeOrClassStaticBlockDeclaration

func IsFunctionLikeOrClassStaticBlockDeclaration(node *Node) bool

func IsFunctionOrModuleBlock

func IsFunctionOrModuleBlock(node *Node) bool

func IsFunctionOrSourceFile

func IsFunctionOrSourceFile(node *Node) bool

func IsFunctionPropertyAssignment

func IsFunctionPropertyAssignment(node *Node) bool

func IsFunctionTypeNode

func IsFunctionTypeNode(node *Node) bool

func IsGetAccessorDeclaration

func IsGetAccessorDeclaration(node *Node) bool

func IsGlobalScopeAugmentation

func IsGlobalScopeAugmentation(node *Node) bool

func IsGlobalSourceFile

func IsGlobalSourceFile(node *Node) bool

func IsHeritageClause

func IsHeritageClause(node *Node) bool

func IsIdentifier

func IsIdentifier(node *Node) bool

func IsIdentifierName

func IsIdentifierName(node *Node) bool

Return true if the given identifier is classified as an IdentifierName by inspecting the parent of the node

func IsImportAttributes

func IsImportAttributes(node *Node) bool

func IsImportCall

func IsImportCall(node *Node) bool

func IsImportClause

func IsImportClause(node *Node) bool

func IsImportDeclaration

func IsImportDeclaration(node *Node) bool

func IsImportEqualsDeclaration

func IsImportEqualsDeclaration(node *Node) bool

func IsImportMeta

func IsImportMeta(node *Node) bool

func IsImportOrExportSpecifier

func IsImportOrExportSpecifier(node *Node) bool

func IsImportSpecifier

func IsImportSpecifier(node *Node) bool

func IsImportTypeNode

func IsImportTypeNode(node *Node) bool

func IsInExpressionContext

func IsInExpressionContext(node *Node) bool

func IsInJSFile

func IsInJSFile(node *Node) bool

func IsInTopLevelContext

func IsInTopLevelContext(node *Node) bool

func IsIndexSignatureDeclaration

func IsIndexSignatureDeclaration(node *Node) bool

func IsIndexedAccessTypeNode

func IsIndexedAccessTypeNode(node *Node) bool

func IsInferTypeNode

func IsInferTypeNode(node *Node) bool

func IsInstanceOfExpression

func IsInstanceOfExpression(node *Node) bool

func IsInterfaceDeclaration

func IsInterfaceDeclaration(node *Node) bool

func IsInternalModuleImportEqualsDeclaration

func IsInternalModuleImportEqualsDeclaration(node *Node) bool

func IsIterationStatement

func IsIterationStatement(node *Node, lookInLabeledStatements bool) bool

func IsJSDocCommentContainingNode

func IsJSDocCommentContainingNode(node *Node) bool

func IsJSDocDeprecatedTag

func IsJSDocDeprecatedTag(node *Node) bool

func IsJSDocKind

func IsJSDocKind(kind Kind) bool

func IsJSDocNode

func IsJSDocNode(node *Node) bool

func IsJSDocReturnTag

func IsJSDocReturnTag(node *Node) bool

func IsJSDocTag

func IsJSDocTag(node *Node) bool

func IsJSDocTypeTag

func IsJSDocTypeTag(node *Node) bool

func IsJSDocUnknownTag

func IsJSDocUnknownTag(node *Node) bool

func IsJsonSourceFile

func IsJsonSourceFile(file *SourceFile) bool

func IsJsxAttribute

func IsJsxAttribute(node *Node) bool

func IsJsxAttributes

func IsJsxAttributes(node *Node) bool

func IsJsxChild

func IsJsxChild(node *Node) bool

func IsJsxClosingElement

func IsJsxClosingElement(node *Node) bool

func IsJsxNamespacedName

func IsJsxNamespacedName(node *Node) bool

func IsJsxOpeningElement

func IsJsxOpeningElement(node *Node) bool

func IsJsxOpeningFragment

func IsJsxOpeningFragment(node *Node) bool

func IsJsxSelfClosingElement

func IsJsxSelfClosingElement(node *Node) bool

func IsJsxTagName

func IsJsxTagName(node *Node) bool

func IsJumpStatementTarget

func IsJumpStatementTarget(node *Node) bool

func IsKeywordKind

func IsKeywordKind(token Kind) bool

func IsLabelName

func IsLabelName(node *Node) bool

func IsLabelOfLabeledStatement

func IsLabelOfLabeledStatement(node *Node) bool

func IsLabeledStatement

func IsLabeledStatement(node *Node) bool

func IsLeftHandSideExpression

func IsLeftHandSideExpression(node *Node) bool

Determines whether a node is a LeftHandSideExpression based only on its kind.

func IsLiteralComputedPropertyDeclarationName

func IsLiteralComputedPropertyDeclarationName(node *Node) bool

func IsLiteralExpression

func IsLiteralExpression(node *Node) bool

func IsLiteralImportTypeNode

func IsLiteralImportTypeNode(node *Node) bool

func IsLiteralKind

func IsLiteralKind(kind Kind) bool

func IsLiteralTypeNode

func IsLiteralTypeNode(node *Node) bool

func IsLocalsContainer

func IsLocalsContainer(node *Node) bool

func IsLogicalBinaryOperator

func IsLogicalBinaryOperator(token Kind) bool

func IsLogicalExpression

func IsLogicalExpression(node *Node) bool

func IsLogicalOrCoalescingAssignmentExpression

func IsLogicalOrCoalescingAssignmentExpression(expr *Node) bool

func IsLogicalOrCoalescingAssignmentOperator

func IsLogicalOrCoalescingAssignmentOperator(token Kind) bool

func IsLogicalOrCoalescingBinaryExpression

func IsLogicalOrCoalescingBinaryExpression(expr *Node) bool

func IsLogicalOrCoalescingBinaryOperator

func IsLogicalOrCoalescingBinaryOperator(token Kind) bool

func IsMappedTypeNode

func IsMappedTypeNode(node *Node) bool

func IsMemberName

func IsMemberName(node *Node) bool

func IsMetaProperty

func IsMetaProperty(node *Node) bool

func IsMethodDeclaration

func IsMethodDeclaration(node *Node) bool

func IsMethodSignatureDeclaration

func IsMethodSignatureDeclaration(node *Node) bool

func IsModifier

func IsModifier(node *Node) bool

func IsModifierKind

func IsModifierKind(token Kind) bool

func IsModuleAugmentationExternal

func IsModuleAugmentationExternal(node *Node) bool

func IsModuleBlock

func IsModuleBlock(node *Node) bool

func IsModuleDeclaration

func IsModuleDeclaration(node *Node) bool

func IsModuleIdentifier

func IsModuleIdentifier(node *Node) bool

func IsNamedExports

func IsNamedExports(node *Node) bool

func IsNamedImports

func IsNamedImports(node *Node) bool

func IsNamedTupleMember

func IsNamedTupleMember(node *Node) bool

func IsNamespaceExport

func IsNamespaceExport(node *Node) bool

func IsNamespaceExportDeclaration

func IsNamespaceExportDeclaration(node *Node) bool

func IsNamespaceImport

func IsNamespaceImport(node *Node) bool

func IsNewExpression

func IsNewExpression(node *Node) bool

func IsNodeDescendantOf

func IsNodeDescendantOf(node *Node, ancestor *Node) bool

func IsNonLocalAlias

func IsNonLocalAlias(symbol *Symbol, excludes SymbolFlags) bool

Indicates that a symbol is an alias that does not merge with a local declaration. OR Is a JSContainer which may merge an alias with a local declaration

func IsNonNullExpression

func IsNonNullExpression(node *Node) bool

func IsNonWhitespaceToken

func IsNonWhitespaceToken(node *Node) bool

func IsNullishCoalesce

func IsNullishCoalesce(node *Node) bool

func IsNumericLiteral

func IsNumericLiteral(node *Node) bool

func IsObjectBindingPattern

func IsObjectBindingPattern(node *Node) bool

func IsObjectLiteralElement

func IsObjectLiteralElement(node *Node) bool

func IsObjectLiteralExpression

func IsObjectLiteralExpression(node *Node) bool

func IsObjectLiteralMethod

func IsObjectLiteralMethod(node *Node) bool

func IsObjectLiteralOrClassExpressionMethodOrAccessor

func IsObjectLiteralOrClassExpressionMethodOrAccessor(node *Node) bool

func IsOmittedExpression

func IsOmittedExpression(node *Node) bool

func IsOptionalChain

func IsOptionalChain(node *Node) bool

Determines if a node is part of an OptionalChain

func IsOptionalChainRoot

func IsOptionalChainRoot(node *Expression) bool

Determines if node is the root expression of an OptionalChain

func IsOptionalTypeNode

func IsOptionalTypeNode(node *Node) bool

func IsOuterExpression

func IsOuterExpression(node *Expression, kinds OuterExpressionKinds) bool

Determines whether node is an "outer expression" of the provided kinds

func IsOutermostOptionalChain

func IsOutermostOptionalChain(node *Expression) bool

Determines whether a node is the outermost `OptionalChain` in an ECMAScript `OptionalExpression`:

  1. For `a?.b.c`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.`)
  2. For `a?.b!`, the outermost chain is `a?.b` (`b` is the end of the chain starting at `a?.`)
  3. For `(a?.b.c).d`, the outermost chain is `a?.b.c` (`c` is the end of the chain starting at `a?.` since parens end the chain)
  4. For `a?.b.c?.d`, both `a?.b.c` and `a?.b.c?.d` are outermost (`c` is the end of the chain starting at `a?.`, and `d` is the end of the chain starting at `c?.`)
  5. For `a?.(b?.c).d`, both `b?.c` and `a?.(b?.c)d` are outermost (`c` is the end of the chain starting at `b`, and `d` is the end of the chain starting at `a?.`)

func IsParameter

func IsParameter(node *Node) bool

func IsParameterLikeOrReturnTag

func IsParameterLikeOrReturnTag(node *Node) bool

func IsParameterPropertyDeclaration

func IsParameterPropertyDeclaration(node *Node, parent *Node) bool

func IsParenthesizedExpression

func IsParenthesizedExpression(node *Node) bool

func IsParenthesizedTypeNode

func IsParenthesizedTypeNode(node *Node) bool

func IsParseTreeNode

func IsParseTreeNode(node *Node) bool

func IsPartOfParameterDeclaration

func IsPartOfParameterDeclaration(node *Node) bool

*

  • This function returns true if the this node's root declaration is a parameter.
  • For example, passing a `ParameterDeclaration` will return true, as will passing a
  • binding element that is a child of a `ParameterDeclaration`. *
  • If you are looking to test that a `Node` is a `ParameterDeclaration`, use `isParameter`.

func IsPartOfTypeNode

func IsPartOfTypeNode(node *Node) bool

func IsPartOfTypeQuery

func IsPartOfTypeQuery(node *Node) bool

func IsPartiallyEmittedExpression

func IsPartiallyEmittedExpression(node *Node) bool

func IsPrefixUnaryExpression

func IsPrefixUnaryExpression(node *Node) bool

func IsPrivateIdentifier

func IsPrivateIdentifier(node *Node) bool

func IsPrivateIdentifierClassElementDeclaration

func IsPrivateIdentifierClassElementDeclaration(node *Node) bool

func IsPrologueDirective

func IsPrologueDirective(node *Node) bool

func IsPropertyAccessExpression

func IsPropertyAccessExpression(node *Node) bool

func IsPropertyAccessOrQualifiedName

func IsPropertyAccessOrQualifiedName(node *Node) bool

func IsPropertyAssignment

func IsPropertyAssignment(node *Node) bool

func IsPropertyDeclaration

func IsPropertyDeclaration(node *Node) bool

func IsPropertyName

func IsPropertyName(node *Node) bool

func IsPropertyNameLiteral

func IsPropertyNameLiteral(node *Node) bool

func IsPropertySignatureDeclaration

func IsPropertySignatureDeclaration(node *Node) bool

func IsPunctuationKind

func IsPunctuationKind(token Kind) bool

func IsPushOrUnshiftIdentifier

func IsPushOrUnshiftIdentifier(node *Node) bool

func IsQualifiedName

func IsQualifiedName(node *Node) bool

func IsQuestionToken

func IsQuestionToken(node *Node) bool

func IsRequireCall

func IsRequireCall(node *Node, requireStringLiteralLikeArgument bool) bool

func IsRestTypeNode

func IsRestTypeNode(node *Node) bool

func IsReturnStatement

func IsReturnStatement(node *Node) bool

func IsSatisfiesExpression

func IsSatisfiesExpression(node *Node) bool

func IsSetAccessorDeclaration

func IsSetAccessorDeclaration(node *Node) bool

func IsShorthandPropertyAssignment

func IsShorthandPropertyAssignment(node *Node) bool

func IsSignedNumericLiteral

func IsSignedNumericLiteral(node *Node) bool

func IsSourceFile

func IsSourceFile(node *Node) bool

func IsSpreadAssignment

func IsSpreadAssignment(node *Node) bool

func IsSpreadElement

func IsSpreadElement(node *Node) bool

func IsStatement

func IsStatement(node *Node) bool

Determines whether a node is a Statement. Ideally this does not use Parent pointers, but it may use them to rule out a Block node that is part of `try` or `catch` or is the Block-like body of a function.

NOTE: ECMA262 would call this either a StatementListItem or ModuleListItem

func IsStatementButNotDeclaration

func IsStatementButNotDeclaration(node *Node) bool

Determines whether a node is a Statement that is not also a Declaration. Ideally this does not use Parent pointers, but it may use them to rule out a Block node that is part of `try` or `catch` or is the Block-like body of a function.

NOTE: ECMA262 would just call this a Statement

func IsStatic

func IsStatic(node *Node) bool

func IsStringLiteral

func IsStringLiteral(node *Node) bool

func IsStringLiteralLike

func IsStringLiteralLike(node *Node) bool

func IsStringOrNumericLiteralLike

func IsStringOrNumericLiteralLike(node *Node) bool

func IsSuperCall

func IsSuperCall(node *Node) bool

func IsSyntheticExpression

func IsSyntheticExpression(node *Node) bool

func IsTaggedTemplateExpression

func IsTaggedTemplateExpression(node *Node) bool

func IsTemplateExpression

func IsTemplateExpression(node *Node) bool

func IsTemplateLiteralTypeSpan

func IsTemplateLiteralTypeSpan(node *Node) bool

func IsTemplateSpan

func IsTemplateSpan(node *Node) bool

func IsThisIdentifier

func IsThisIdentifier(node *Node) bool

func IsThisParameter

func IsThisParameter(node *Node) bool

func IsThisTypeNode

func IsThisTypeNode(node *Node) bool

func IsTokenKind

func IsTokenKind(token Kind) bool

func IsTryStatement

func IsTryStatement(node *Node) bool

func IsTupleTypeNode

func IsTupleTypeNode(node *Node) bool

func IsTypeAliasDeclaration

func IsTypeAliasDeclaration(node *Node) bool

func IsTypeElement

func IsTypeElement(node *Node) bool

func IsTypeLiteralNode

func IsTypeLiteralNode(node *Node) bool

func IsTypeNode

func IsTypeNode(node *Node) bool

func IsTypeNodeKind

func IsTypeNodeKind(kind Kind) bool

func IsTypeOfExpression

func IsTypeOfExpression(node *Node) bool

func IsTypeOperatorNode

func IsTypeOperatorNode(node *Node) bool

func IsTypeParameterDeclaration

func IsTypeParameterDeclaration(node *Node) bool

func IsTypePredicateNode

func IsTypePredicateNode(node *Node) bool

func IsTypeQueryNode

func IsTypeQueryNode(node *Node) bool

func IsTypeReferenceNode

func IsTypeReferenceNode(node *Node) bool

func IsUnaryExpression

func IsUnaryExpression(node *Node) bool

Determines whether a node is a UnaryExpression based only on its kind.

func IsVarAwaitUsing

func IsVarAwaitUsing(node *Node) bool

Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of an `await using` declaration.

func IsVarConst

func IsVarConst(node *Node) bool

Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of a `const` declaration.

func IsVarConstLike

func IsVarConstLike(node *Node) bool

Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of a `const`, `using` or `await using` declaration.

func IsVarLet

func IsVarLet(node *Node) bool

Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of a `let` declaration.

func IsVarUsing

func IsVarUsing(node *Node) bool

Gets whether a bound `VariableDeclaration` or `VariableDeclarationList` is part of a `using` declaration.

func IsVariableDeclaration

func IsVariableDeclaration(node *Node) bool

func IsVariableDeclarationList

func IsVariableDeclarationList(node *Node) bool

func IsVariableStatement

func IsVariableStatement(node *Node) bool

func IsVoidExpression

func IsVoidExpression(node *Node) bool

func IsWhitespaceOnlyJsxText

func IsWhitespaceOnlyJsxText(node *Node) bool

func ModuleExportNameIsDefault

func ModuleExportNameIsDefault(node *Node) bool

func NodeHasName

func NodeHasName(statement *Node, id *Node) bool

func NodeIsMissing

func NodeIsMissing(node *Node) bool

Determines if a node is missing (either `nil` or empty)

func NodeIsPresent

func NodeIsPresent(node *Node) bool

Determines if a node is present

func NodeIsSynthesized

func NodeIsSynthesized(node *Node) bool

Determines if a node contains synthetic positions

func NodeKindIs

func NodeKindIs(node *Node, kinds ...Kind) bool

func PositionIsSynthesized

func PositionIsSynthesized(pos int) bool

Determines whether a position is synthetic

func SetParentInChildren

func SetParentInChildren(node *Node)

func SymbolName

func SymbolName(symbol *Symbol) string

func TryGetTextOfPropertyName

func TryGetTextOfPropertyName(name *Node) (string, bool)

Types

type AccessExpression

type AccessExpression = Node // PropertyAccessExpression | ElementAccessExpression

type AccessorDeclaration

type AccessorDeclaration = Node // GetAccessorDeclaration | SetAccessorDeclaration

type AccessorDeclarationBase

func (*AccessorDeclarationBase) ForEachChild

func (node *AccessorDeclarationBase) ForEachChild(v Visitor) bool

func (*AccessorDeclarationBase) IsAccessorDeclaration

func (node *AccessorDeclarationBase) IsAccessorDeclaration()

type ArgumentList

type ArgumentList = NodeList // NodeList[*Expression]

type ArrayLiteralExpression

type ArrayLiteralExpression struct {
	ExpressionBase
	Elements  *NodeList // NodeList[*Expression]
	MultiLine bool
}

func (*ArrayLiteralExpression) Clone

func (node *ArrayLiteralExpression) Clone(f *NodeFactory) *Node

func (*ArrayLiteralExpression) ForEachChild

func (node *ArrayLiteralExpression) ForEachChild(v Visitor) bool

func (*ArrayLiteralExpression) VisitEachChild

func (node *ArrayLiteralExpression) VisitEachChild(v *NodeVisitor) *Node

type ArrayTypeNode

type ArrayTypeNode struct {
	TypeNodeBase
	ElementType *TypeNode // TypeNode
}

func (*ArrayTypeNode) Clone

func (node *ArrayTypeNode) Clone(f *NodeFactory) *Node

func (*ArrayTypeNode) ForEachChild

func (node *ArrayTypeNode) ForEachChild(v Visitor) bool

func (*ArrayTypeNode) VisitEachChild

func (node *ArrayTypeNode) VisitEachChild(v *NodeVisitor) *Node

type ArrowFunction

type ArrowFunction struct {
	ExpressionBase
	DeclarationBase
	ModifiersBase
	FunctionLikeWithBodyBase
	FlowNodeBase
	EqualsGreaterThanToken *TokenNode // TokenNode
}

func (*ArrowFunction) Clone

func (node *ArrowFunction) Clone(f *NodeFactory) *Node

func (*ArrowFunction) ForEachChild

func (node *ArrowFunction) ForEachChild(v Visitor) bool

func (*ArrowFunction) Name

func (node *ArrowFunction) Name() *DeclarationName

func (*ArrowFunction) VisitEachChild

func (node *ArrowFunction) VisitEachChild(v *NodeVisitor) *Node

type AsExpression

type AsExpression struct {
	ExpressionBase
	Expression *Expression // Expression
	Type       *TypeNode   // TypeNode
}

func (*AsExpression) Clone

func (node *AsExpression) Clone(f *NodeFactory) *Node

func (*AsExpression) ForEachChild

func (node *AsExpression) ForEachChild(v Visitor) bool

func (*AsExpression) VisitEachChild

func (node *AsExpression) VisitEachChild(v *NodeVisitor) *Node

type AwaitExpression

type AwaitExpression struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*AwaitExpression) Clone

func (node *AwaitExpression) Clone(f *NodeFactory) *Node

func (*AwaitExpression) ForEachChild

func (node *AwaitExpression) ForEachChild(v Visitor) bool

func (*AwaitExpression) VisitEachChild

func (node *AwaitExpression) VisitEachChild(v *NodeVisitor) *Node

type BigIntLiteral

type BigIntLiteral struct {
	ExpressionBase
	LiteralLikeBase
}

func (*BigIntLiteral) Clone

func (node *BigIntLiteral) Clone(f *NodeFactory) *Node

type BinaryExpression

type BinaryExpression struct {
	ExpressionBase
	DeclarationBase
	Left          *Expression // Expression
	OperatorToken *TokenNode  // TokenNode
	Right         *Expression // Expression
}

func (*BinaryExpression) Clone

func (node *BinaryExpression) Clone(f *NodeFactory) *Node

func (*BinaryExpression) ForEachChild

func (node *BinaryExpression) ForEachChild(v Visitor) bool

func (*BinaryExpression) VisitEachChild

func (node *BinaryExpression) VisitEachChild(v *NodeVisitor) *Node

type BindingElement

type BindingElement struct {
	NodeBase
	DeclarationBase
	ExportableBase
	FlowNodeBase
	DotDotDotToken *TokenNode    // TokenNode. Present on rest element (in object binding pattern)
	PropertyName   *PropertyName // PropertyName. Optional binding property name in object binding pattern

	Initializer *Expression // Expression. Optional
	// contains filtered or unexported fields
}

func (*BindingElement) Clone

func (node *BindingElement) Clone(f *NodeFactory) *Node

func (*BindingElement) ForEachChild

func (node *BindingElement) ForEachChild(v Visitor) bool

func (*BindingElement) Name

func (node *BindingElement) Name() *DeclarationName

func (*BindingElement) VisitEachChild

func (node *BindingElement) VisitEachChild(v *NodeVisitor) *Node

type BindingElementList

type BindingElementList = NodeList // NodeList[*BindingElement]

type BindingElementNode

type BindingElementNode = Node

type BindingName

type BindingName = Node // Identifier | BindingPattern

type BindingPattern

type BindingPattern struct {
	NodeBase
	Elements *NodeList // NodeList[*BindingElementNode]
}

func (*BindingPattern) Clone

func (node *BindingPattern) Clone(f *NodeFactory) *Node

func (*BindingPattern) ForEachChild

func (node *BindingPattern) ForEachChild(v Visitor) bool

func (*BindingPattern) VisitEachChild

func (node *BindingPattern) VisitEachChild(v *NodeVisitor) *Node

type Block

type Block struct {
	StatementBase
	LocalsContainerBase
	Statements *NodeList // NodeList[*Statement]
	Multiline  bool
}

func (*Block) Clone

func (node *Block) Clone(f *NodeFactory) *Node

func (*Block) ForEachChild

func (node *Block) ForEachChild(v Visitor) bool

func (*Block) VisitEachChild

func (node *Block) VisitEachChild(v *NodeVisitor) *Node

type BlockNode

type BlockNode = Node

type BlockOrExpression

type BlockOrExpression = Node // Block | Expression

type BodyBase

type BodyBase struct {
	AsteriskToken *TokenNode
	Body          *BlockOrExpression // Optional, can be Expression only in arrow functions
	EndFlowNode   *FlowNode
}

func (*BodyBase) BodyData

func (node *BodyBase) BodyData() *BodyBase

type BreakStatement

type BreakStatement struct {
	StatementBase
	Label *IdentifierNode // IdentifierNode. Optional
}

func (*BreakStatement) Clone

func (node *BreakStatement) Clone(f *NodeFactory) *Node

func (*BreakStatement) ForEachChild

func (node *BreakStatement) ForEachChild(v Visitor) bool

func (*BreakStatement) VisitEachChild

func (node *BreakStatement) VisitEachChild(v *NodeVisitor) *Node

type CallExpression

type CallExpression struct {
	ExpressionBase
	Expression       *Expression // Expression
	QuestionDotToken *TokenNode  // TokenNode
	TypeArguments    *NodeList   // NodeList[*TypeNode]. Optional
	Arguments        *NodeList   // NodeList[*Expression]
}

func (*CallExpression) Clone

func (node *CallExpression) Clone(f *NodeFactory) *Node

func (*CallExpression) ForEachChild

func (node *CallExpression) ForEachChild(v Visitor) bool

func (*CallExpression) VisitEachChild

func (node *CallExpression) VisitEachChild(v *NodeVisitor) *Node

type CallSignatureDeclaration

type CallSignatureDeclaration struct {
	NodeBase
	DeclarationBase
	FunctionLikeBase
	TypeElementBase
}

func (*CallSignatureDeclaration) Clone

func (node *CallSignatureDeclaration) Clone(f *NodeFactory) *Node

func (*CallSignatureDeclaration) ForEachChild

func (node *CallSignatureDeclaration) ForEachChild(v Visitor) bool

func (*CallSignatureDeclaration) VisitEachChild

func (node *CallSignatureDeclaration) VisitEachChild(v *NodeVisitor) *Node

type CaseBlock

type CaseBlock struct {
	NodeBase
	LocalsContainerBase
	Clauses *NodeList // NodeList[*CaseOrDefaultClauseNode]
}

func (*CaseBlock) Clone

func (node *CaseBlock) Clone(f *NodeFactory) *Node

func (*CaseBlock) ForEachChild

func (node *CaseBlock) ForEachChild(v Visitor) bool

func (*CaseBlock) VisitEachChild

func (node *CaseBlock) VisitEachChild(v *NodeVisitor) *Node

type CaseBlockNode

type CaseBlockNode = Node

type CaseClausesList

type CaseClausesList = NodeList // NodeList[*CaseOrDefaultClause]

type CaseOrDefaultClause

type CaseOrDefaultClause struct {
	NodeBase
	Expression          *Expression // Expression. nil in default clause
	Statements          *NodeList   // NodeList[*Statement]
	FallthroughFlowNode *FlowNode
}

func (*CaseOrDefaultClause) Clone

func (node *CaseOrDefaultClause) Clone(f *NodeFactory) *Node

func (*CaseOrDefaultClause) ForEachChild

func (node *CaseOrDefaultClause) ForEachChild(v Visitor) bool

func (*CaseOrDefaultClause) VisitEachChild

func (node *CaseOrDefaultClause) VisitEachChild(v *NodeVisitor) *Node

type CaseOrDefaultClauseNode

type CaseOrDefaultClauseNode = Node

type CatchClause

type CatchClause struct {
	NodeBase
	LocalsContainerBase
	VariableDeclaration *VariableDeclarationNode // VariableDeclarationNode. Optional
	Block               *BlockNode               // BlockNode
}

func (*CatchClause) Clone

func (node *CatchClause) Clone(f *NodeFactory) *Node

func (*CatchClause) ForEachChild

func (node *CatchClause) ForEachChild(v Visitor) bool

func (*CatchClause) VisitEachChild

func (node *CatchClause) VisitEachChild(v *NodeVisitor) *Node

type CatchClauseNode

type CatchClauseNode = Node

type CheckFlags

type CheckFlags uint32
const (
	CheckFlagsNone                   CheckFlags = 0
	CheckFlagsInstantiated           CheckFlags = 1 << 0  // Instantiated symbol
	CheckFlagsSyntheticProperty      CheckFlags = 1 << 1  // Property in union or intersection type
	CheckFlagsSyntheticMethod        CheckFlags = 1 << 2  // Method in union or intersection type
	CheckFlagsReadonly               CheckFlags = 1 << 3  // Readonly transient symbol
	CheckFlagsReadPartial            CheckFlags = 1 << 4  // Synthetic property present in some but not all constituents
	CheckFlagsWritePartial           CheckFlags = 1 << 5  // Synthetic property present in some but only satisfied by an index signature in others
	CheckFlagsHasNonUniformType      CheckFlags = 1 << 6  // Synthetic property with non-uniform type in constituents
	CheckFlagsHasLiteralType         CheckFlags = 1 << 7  // Synthetic property with at least one literal type in constituents
	CheckFlagsContainsPublic         CheckFlags = 1 << 8  // Synthetic property with public constituent(s)
	CheckFlagsContainsProtected      CheckFlags = 1 << 9  // Synthetic property with protected constituent(s)
	CheckFlagsContainsPrivate        CheckFlags = 1 << 10 // Synthetic property with private constituent(s)
	CheckFlagsContainsStatic         CheckFlags = 1 << 11 // Synthetic property with static constituent(s)
	CheckFlagsLate                   CheckFlags = 1 << 12 // Late-bound symbol for a computed property with a dynamic name
	CheckFlagsReverseMapped          CheckFlags = 1 << 13 // Property of reverse-inferred homomorphic mapped type
	CheckFlagsOptionalParameter      CheckFlags = 1 << 14 // Optional parameter
	CheckFlagsRestParameter          CheckFlags = 1 << 15 // Rest parameter
	CheckFlagsDeferredType           CheckFlags = 1 << 16 // Calculation of the type of this symbol is deferred due to processing costs, should be fetched with `getTypeOfSymbolWithDeferredType`
	CheckFlagsHasNeverType           CheckFlags = 1 << 17 // Synthetic property with at least one never type in constituents
	CheckFlagsMapped                 CheckFlags = 1 << 18 // Property of mapped type
	CheckFlagsStripOptional          CheckFlags = 1 << 19 // Strip optionality in mapped property
	CheckFlagsUnresolved             CheckFlags = 1 << 20 // Unresolved type alias symbol
	CheckFlagsIsDiscriminantComputed CheckFlags = 1 << 21 // IsDiscriminant flags has been computed
	CheckFlagsIsDiscriminant         CheckFlags = 1 << 22 // Discriminant property
	CheckFlagsSynthetic                         = CheckFlagsSyntheticProperty | CheckFlagsSyntheticMethod
	CheckFlagsNonUniformAndLiteral              = CheckFlagsHasNonUniformType | CheckFlagsHasLiteralType
	CheckFlagsPartial                           = CheckFlagsReadPartial | CheckFlagsWritePartial
)

type ClassDeclaration

type ClassDeclaration struct {
	StatementBase
	ClassLikeBase
}

func (*ClassDeclaration) Clone

func (node *ClassDeclaration) Clone(f *NodeFactory) *Node

func (*ClassDeclaration) VisitEachChild

func (node *ClassDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ClassElement

type ClassElement = Node // Node with ClassElementBase

type ClassElementBase

type ClassElementBase struct{}

type ClassElementList

type ClassElementList = NodeList // NodeList[*ClassElement]

type ClassExpression

type ClassExpression struct {
	ExpressionBase
	ClassLikeBase
}

func (*ClassExpression) Clone

func (node *ClassExpression) Clone(f *NodeFactory) *Node

func (*ClassExpression) VisitEachChild

func (node *ClassExpression) VisitEachChild(v *NodeVisitor) *Node

type ClassLikeBase

type ClassLikeBase struct {
	DeclarationBase
	ExportableBase
	ModifiersBase

	TypeParameters  *NodeList // NodeList[*TypeParameterDeclarationNode]. Optional
	HeritageClauses *NodeList // NodeList[*HeritageClauseNode]. Optional
	Members         *NodeList // NodeList[*ClassElement]
	// contains filtered or unexported fields
}

func (*ClassLikeBase) ClassLikeData

func (node *ClassLikeBase) ClassLikeData() *ClassLikeBase

func (*ClassLikeBase) ForEachChild

func (node *ClassLikeBase) ForEachChild(v Visitor) bool

func (*ClassLikeBase) Name

func (node *ClassLikeBase) Name() *DeclarationName

type ClassLikeDeclaration

type ClassLikeDeclaration = Node // ClassDeclaration | ClassExpression

func TryGetClassExtendingExpressionWithTypeArguments

func TryGetClassExtendingExpressionWithTypeArguments(node *Node) *ClassLikeDeclaration

func TryGetClassImplementingOrExtendingExpressionWithTypeArguments

func TryGetClassImplementingOrExtendingExpressionWithTypeArguments(node *Node) (class *ClassLikeDeclaration, isImplements bool)

type ClassStaticBlockDeclaration

type ClassStaticBlockDeclaration struct {
	NodeBase
	DeclarationBase
	ModifiersBase
	LocalsContainerBase
	ClassElementBase
	Body           *BlockNode // BlockNode
	ReturnFlowNode *FlowNode
}

func (*ClassStaticBlockDeclaration) Clone

func (node *ClassStaticBlockDeclaration) Clone(f *NodeFactory) *Node

func (*ClassStaticBlockDeclaration) ForEachChild

func (node *ClassStaticBlockDeclaration) ForEachChild(v Visitor) bool

func (*ClassStaticBlockDeclaration) VisitEachChild

func (node *ClassStaticBlockDeclaration) VisitEachChild(v *NodeVisitor) *Node

type CommentDirective

type CommentDirective struct {
	Loc  core.TextRange
	Kind CommentDirectiveKind
}

type CommentDirectiveKind

type CommentDirectiveKind int32
const (
	CommentDirectiveKindUnknown CommentDirectiveKind = iota
	CommentDirectiveKindExpectError
	CommentDirectiveKindIgnore
)

type CommentRange

type CommentRange struct {
	core.TextRange
	HasTrailingNewLine bool
	Kind               Kind
}

type ComputedPropertyName

type ComputedPropertyName struct {
	NodeBase
	Expression *Expression // Expression
}

func (*ComputedPropertyName) Clone

func (node *ComputedPropertyName) Clone(f *NodeFactory) *Node

func (*ComputedPropertyName) ForEachChild

func (node *ComputedPropertyName) ForEachChild(v Visitor) bool

func (*ComputedPropertyName) VisitEachChild

func (node *ComputedPropertyName) VisitEachChild(v *NodeVisitor) *Node

type ConditionalExpression

type ConditionalExpression struct {
	ExpressionBase
	Condition     *Expression
	QuestionToken *TokenNode
	WhenTrue      *Expression
	ColonToken    *TokenNode
	WhenFalse     *Expression
}

func (*ConditionalExpression) Clone

func (node *ConditionalExpression) Clone(f *NodeFactory) *Node

func (*ConditionalExpression) ForEachChild

func (node *ConditionalExpression) ForEachChild(v Visitor) bool

func (*ConditionalExpression) VisitEachChild

func (node *ConditionalExpression) VisitEachChild(v *NodeVisitor) *Node

type ConditionalTypeNode

type ConditionalTypeNode struct {
	TypeNodeBase
	LocalsContainerBase
	CheckType   *TypeNode // TypeNode
	ExtendsType *TypeNode // TypeNode
	TrueType    *TypeNode // TypeNode
	FalseType   *TypeNode // TypeNode
}

func (*ConditionalTypeNode) Clone

func (node *ConditionalTypeNode) Clone(f *NodeFactory) *Node

func (*ConditionalTypeNode) ForEachChild

func (node *ConditionalTypeNode) ForEachChild(v Visitor) bool

func (*ConditionalTypeNode) VisitEachChild

func (node *ConditionalTypeNode) VisitEachChild(v *NodeVisitor) *Node

type ConstructSignatureDeclaration

type ConstructSignatureDeclaration struct {
	NodeBase
	DeclarationBase
	FunctionLikeBase
	TypeElementBase
}

func (*ConstructSignatureDeclaration) Clone

func (*ConstructSignatureDeclaration) ForEachChild

func (node *ConstructSignatureDeclaration) ForEachChild(v Visitor) bool

func (*ConstructSignatureDeclaration) VisitEachChild

func (node *ConstructSignatureDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ConstructorDeclaration

type ConstructorDeclaration struct {
	NodeBase
	DeclarationBase
	ModifiersBase
	FunctionLikeWithBodyBase
	ClassElementBase
	ReturnFlowNode *FlowNode
}

func (*ConstructorDeclaration) Clone

func (node *ConstructorDeclaration) Clone(f *NodeFactory) *Node

func (*ConstructorDeclaration) ForEachChild

func (node *ConstructorDeclaration) ForEachChild(v Visitor) bool

func (*ConstructorDeclaration) VisitEachChild

func (node *ConstructorDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ConstructorTypeNode

type ConstructorTypeNode struct {
	FunctionOrConstructorTypeNodeBase
}

func (*ConstructorTypeNode) Clone

func (node *ConstructorTypeNode) Clone(f *NodeFactory) *Node

func (*ConstructorTypeNode) VisitEachChild

func (node *ConstructorTypeNode) VisitEachChild(v *NodeVisitor) *Node

type ContinueStatement

type ContinueStatement struct {
	StatementBase
	Label *IdentifierNode // IdentifierNode. Optional
}

func (*ContinueStatement) Clone

func (node *ContinueStatement) Clone(f *NodeFactory) *Node

func (*ContinueStatement) ForEachChild

func (node *ContinueStatement) ForEachChild(v Visitor) bool

func (*ContinueStatement) VisitEachChild

func (node *ContinueStatement) VisitEachChild(v *NodeVisitor) *Node

type DebuggerStatement

type DebuggerStatement struct {
	StatementBase
}

func (*DebuggerStatement) Clone

func (node *DebuggerStatement) Clone(f *NodeFactory) *Node

type Declaration

type Declaration = Node // Node with DeclarationBase

type DeclarationBase

type DeclarationBase struct {
	Symbol *Symbol // Symbol declared by node (initialized by binding)
}

func (*DeclarationBase) DeclarationData

func (node *DeclarationBase) DeclarationData() *DeclarationBase

type DeclarationName

type DeclarationName = Node // Identifier | PrivateIdentifier | StringLiteral | NumericLiteral | BigIntLiteral | NoSubstitutionTemplateLiteral | ComputedPropertyName | BindingPattern | ElementAccessExpression

type Decorator

type Decorator struct {
	NodeBase
	Expression *LeftHandSideExpression // LeftHandSideExpression
}

func (*Decorator) Clone

func (node *Decorator) Clone(f *NodeFactory) *Node

func (*Decorator) ForEachChild

func (node *Decorator) ForEachChild(v Visitor) bool

func (*Decorator) VisitEachChild

func (node *Decorator) VisitEachChild(v *NodeVisitor) *Node

type DeleteExpression

type DeleteExpression struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*DeleteExpression) Clone

func (node *DeleteExpression) Clone(f *NodeFactory) *Node

func (*DeleteExpression) ForEachChild

func (node *DeleteExpression) ForEachChild(v Visitor) bool

func (*DeleteExpression) VisitEachChild

func (node *DeleteExpression) VisitEachChild(v *NodeVisitor) *Node

type Diagnostic

type Diagnostic struct {
	// contains filtered or unexported fields
}

func NewCompilerDiagnostic

func NewCompilerDiagnostic(message *diagnostics.Message, args ...any) *Diagnostic

func NewDiagnostic

func NewDiagnostic(file *SourceFile, loc core.TextRange, message *diagnostics.Message, args ...any) *Diagnostic

func NewDiagnosticChain

func NewDiagnosticChain(chain *Diagnostic, message *diagnostics.Message, args ...any) *Diagnostic

func (*Diagnostic) AddMessageChain

func (d *Diagnostic) AddMessageChain(messageChain *Diagnostic) *Diagnostic

func (*Diagnostic) AddRelatedInfo

func (d *Diagnostic) AddRelatedInfo(relatedInformation *Diagnostic) *Diagnostic

func (*Diagnostic) Category

func (d *Diagnostic) Category() diagnostics.Category

func (*Diagnostic) Code

func (d *Diagnostic) Code() int32

func (*Diagnostic) End

func (d *Diagnostic) End() int

func (*Diagnostic) File

func (d *Diagnostic) File() *SourceFile

func (*Diagnostic) Len

func (d *Diagnostic) Len() int

func (*Diagnostic) Loc

func (d *Diagnostic) Loc() core.TextRange

func (*Diagnostic) Message

func (d *Diagnostic) Message() string

func (*Diagnostic) MessageChain

func (d *Diagnostic) MessageChain() []*Diagnostic

func (*Diagnostic) Pos

func (d *Diagnostic) Pos() int

func (*Diagnostic) RelatedInformation

func (d *Diagnostic) RelatedInformation() []*Diagnostic

func (*Diagnostic) SetCategory

func (d *Diagnostic) SetCategory(category diagnostics.Category)

func (*Diagnostic) SetFile

func (d *Diagnostic) SetFile(file *SourceFile)

func (*Diagnostic) SetLocation

func (d *Diagnostic) SetLocation(loc core.TextRange)

func (*Diagnostic) SetMessageChain

func (d *Diagnostic) SetMessageChain(messageChain []*Diagnostic) *Diagnostic

func (*Diagnostic) SetRelatedInfo

func (d *Diagnostic) SetRelatedInfo(relatedInformation []*Diagnostic) *Diagnostic

type DiagnosticsCollection

type DiagnosticsCollection struct {
	// contains filtered or unexported fields
}

func (*DiagnosticsCollection) Add

func (c *DiagnosticsCollection) Add(diagnostic *Diagnostic)

func (*DiagnosticsCollection) GetDiagnostics

func (c *DiagnosticsCollection) GetDiagnostics() []*Diagnostic

func (*DiagnosticsCollection) GetDiagnosticsForFile

func (c *DiagnosticsCollection) GetDiagnosticsForFile(fileName string) []*Diagnostic

func (*DiagnosticsCollection) GetGlobalDiagnostics

func (c *DiagnosticsCollection) GetGlobalDiagnostics() []*Diagnostic

func (*DiagnosticsCollection) Lookup

func (c *DiagnosticsCollection) Lookup(diagnostic *Diagnostic) *Diagnostic

type DoStatement

type DoStatement struct {
	StatementBase
	Statement  *Statement  // Statement
	Expression *Expression // Expression
}

func (*DoStatement) Clone

func (node *DoStatement) Clone(f *NodeFactory) *Node

func (*DoStatement) ForEachChild

func (node *DoStatement) ForEachChild(v Visitor) bool

func (*DoStatement) VisitEachChild

func (node *DoStatement) VisitEachChild(v *NodeVisitor) *Node

type ElementAccessExpression

type ElementAccessExpression struct {
	ExpressionBase
	FlowNodeBase
	Expression         *Expression // Expression
	QuestionDotToken   *TokenNode  // TokenNode
	ArgumentExpression *Expression // Expression
}

func (*ElementAccessExpression) Clone

func (node *ElementAccessExpression) Clone(f *NodeFactory) *Node

func (*ElementAccessExpression) ForEachChild

func (node *ElementAccessExpression) ForEachChild(v Visitor) bool

func (*ElementAccessExpression) VisitEachChild

func (node *ElementAccessExpression) VisitEachChild(v *NodeVisitor) *Node

type ElementList

type ElementList = NodeList // NodeList[*Expression]

type EmptyStatement

type EmptyStatement struct {
	StatementBase
}

func (*EmptyStatement) Clone

func (node *EmptyStatement) Clone(f *NodeFactory) *Node

type EntityName

type EntityName = Node // Identifier | QualifiedName

type EnumDeclaration

type EnumDeclaration struct {
	StatementBase
	DeclarationBase
	ExportableBase
	ModifiersBase

	Members *NodeList // NodeList[*EnumMemberNode]
	// contains filtered or unexported fields
}

func (*EnumDeclaration) Clone

func (node *EnumDeclaration) Clone(f *NodeFactory) *Node

func (*EnumDeclaration) ForEachChild

func (node *EnumDeclaration) ForEachChild(v Visitor) bool

func (*EnumDeclaration) Name

func (node *EnumDeclaration) Name() *DeclarationName

func (*EnumDeclaration) VisitEachChild

func (node *EnumDeclaration) VisitEachChild(v *NodeVisitor) *Node

type EnumDeclarationNode

type EnumDeclarationNode = Node

type EnumMember

type EnumMember struct {
	NodeBase
	NamedMemberBase
	Initializer *Expression // Expression. Optional
}

func (*EnumMember) Clone

func (node *EnumMember) Clone(f *NodeFactory) *Node

func (*EnumMember) ForEachChild

func (node *EnumMember) ForEachChild(v Visitor) bool

func (*EnumMember) Name

func (node *EnumMember) Name() *DeclarationName

func (*EnumMember) VisitEachChild

func (node *EnumMember) VisitEachChild(v *NodeVisitor) *Node

type EnumMemberList

type EnumMemberList = NodeList // NodeList[*EnumMember]

type EnumMemberNode

type EnumMemberNode = Node

type ExportAssignment

type ExportAssignment struct {
	StatementBase
	DeclarationBase
	ModifiersBase
	IsExportEquals bool
	Expression     *Expression // Expression
}

This is either an `export =` or an `export default` declaration. Unless `isExportEquals` is set, this node was parsed as an `export default`.

func (*ExportAssignment) Clone

func (node *ExportAssignment) Clone(f *NodeFactory) *Node

func (*ExportAssignment) ForEachChild

func (node *ExportAssignment) ForEachChild(v Visitor) bool

func (*ExportAssignment) VisitEachChild

func (node *ExportAssignment) VisitEachChild(v *NodeVisitor) *Node

type ExportDeclaration

type ExportDeclaration struct {
	StatementBase
	DeclarationBase
	ModifiersBase
	IsTypeOnly      bool
	ExportClause    *NamedExportBindings  // NamedExportBindings. Optional
	ModuleSpecifier *Expression           // Expression. Optional
	Attributes      *ImportAttributesNode // ImportAttributesNode. Optional
}

func (*ExportDeclaration) Clone

func (node *ExportDeclaration) Clone(f *NodeFactory) *Node

func (*ExportDeclaration) ForEachChild

func (node *ExportDeclaration) ForEachChild(v Visitor) bool

func (*ExportDeclaration) VisitEachChild

func (node *ExportDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ExportSpecifier

type ExportSpecifier struct {
	NodeBase
	DeclarationBase
	ExportableBase
	IsTypeOnly   bool
	PropertyName *ModuleExportName // ModuleExportName. Optional, name preceding 'as' keyword
	// contains filtered or unexported fields
}

func (*ExportSpecifier) Clone

func (node *ExportSpecifier) Clone(f *NodeFactory) *Node

func (*ExportSpecifier) ForEachChild

func (node *ExportSpecifier) ForEachChild(v Visitor) bool

func (*ExportSpecifier) Name

func (node *ExportSpecifier) Name() *DeclarationName

func (*ExportSpecifier) VisitEachChild

func (node *ExportSpecifier) VisitEachChild(v *NodeVisitor) *Node

type ExportSpecifierList

type ExportSpecifierList = NodeList // NodeList[*ExportSpecifier]

type ExportSpecifierNode

type ExportSpecifierNode = Node

type ExportableBase

type ExportableBase struct {
	LocalSymbol *Symbol // Local symbol declared by node (initialized by binding only for exported nodes)
}

func (*ExportableBase) ExportableData

func (node *ExportableBase) ExportableData() *ExportableBase

type Expression

type Expression = Node // Node with ExpressionBase

func GetExternalModuleName

func GetExternalModuleName(node *Node) *Expression

func GetLeftmostExpression

func GetLeftmostExpression(node *Expression, stopAtCallExpressions bool) *Expression

Gets the leftmost expression of an expression, e.g. `a` in `a.b`, `a[b]`, `a++`, `a+b`, `a?b:c`, `a as B`, etc.

func SkipOuterExpressions

func SkipOuterExpressions(node *Expression, kinds OuterExpressionKinds) *Expression

Descends into an expression, skipping past "outer expressions" of the provided kinds

func SkipParentheses

func SkipParentheses(node *Expression) *Expression

Skips past the parentheses of an expression

func SkipPartiallyEmittedExpressions

func SkipPartiallyEmittedExpressions(node *Expression) *Expression

type ExpressionBase

type ExpressionBase struct {
	NodeBase
}

type ExpressionStatement

type ExpressionStatement struct {
	StatementBase
	Expression *Expression // Expression
}

func (*ExpressionStatement) Clone

func (node *ExpressionStatement) Clone(f *NodeFactory) *Node

func (*ExpressionStatement) ForEachChild

func (node *ExpressionStatement) ForEachChild(v Visitor) bool

func (*ExpressionStatement) VisitEachChild

func (node *ExpressionStatement) VisitEachChild(v *NodeVisitor) *Node

type ExpressionWithTypeArguments

type ExpressionWithTypeArguments struct {
	ExpressionBase
	Expression    *Expression // Expression
	TypeArguments *NodeList   // NodeList[*TypeNode]. Optional
}

func (*ExpressionWithTypeArguments) Clone

func (node *ExpressionWithTypeArguments) Clone(f *NodeFactory) *Node

func (*ExpressionWithTypeArguments) ForEachChild

func (node *ExpressionWithTypeArguments) ForEachChild(v Visitor) bool

func (*ExpressionWithTypeArguments) VisitEachChild

func (node *ExpressionWithTypeArguments) VisitEachChild(v *NodeVisitor) *Node

type ExpressionWithTypeArgumentsList

type ExpressionWithTypeArgumentsList = NodeList // NodeList[*ExpressionWithTypeArguments]

type ExpressionWithTypeArgumentsNode

type ExpressionWithTypeArgumentsNode = Node

func GetExtendsHeritageClauseElement

func GetExtendsHeritageClauseElement(node *Node) *ExpressionWithTypeArgumentsNode

func GetExtendsHeritageClauseElements

func GetExtendsHeritageClauseElements(node *Node) []*ExpressionWithTypeArgumentsNode

func GetImplementsHeritageClauseElements

func GetImplementsHeritageClauseElements(node *Node) []*ExpressionWithTypeArgumentsNode

type ExternalModuleReference

type ExternalModuleReference struct {
	NodeBase
	Expression *Expression // Expression
}

func (*ExternalModuleReference) Clone

func (node *ExternalModuleReference) Clone(f *NodeFactory) *Node

func (*ExternalModuleReference) ForEachChild

func (node *ExternalModuleReference) ForEachChild(v Visitor) bool

func (*ExternalModuleReference) VisitEachChild

func (node *ExternalModuleReference) VisitEachChild(v *NodeVisitor) *Node

type FileReference

type FileReference struct {
	core.TextRange
	FileName       string
	ResolutionMode core.ResolutionMode
	Preserve       bool
}

type FindAncestorResult

type FindAncestorResult int32
const (
	FindAncestorFalse FindAncestorResult = iota
	FindAncestorTrue
	FindAncestorQuit
)

type FlowFlags

type FlowFlags uint32
const (
	FlowFlagsUnreachable    FlowFlags = 1 << 0  // Unreachable code
	FlowFlagsStart          FlowFlags = 1 << 1  // Start of flow graph
	FlowFlagsBranchLabel    FlowFlags = 1 << 2  // Non-looping junction
	FlowFlagsLoopLabel      FlowFlags = 1 << 3  // Looping junction
	FlowFlagsAssignment     FlowFlags = 1 << 4  // Assignment
	FlowFlagsTrueCondition  FlowFlags = 1 << 5  // Condition known to be true
	FlowFlagsFalseCondition FlowFlags = 1 << 6  // Condition known to be false
	FlowFlagsSwitchClause   FlowFlags = 1 << 7  // Switch statement clause
	FlowFlagsArrayMutation  FlowFlags = 1 << 8  // Potential array mutation
	FlowFlagsCall           FlowFlags = 1 << 9  // Potential assertion call
	FlowFlagsReduceLabel    FlowFlags = 1 << 10 // Temporarily reduce antecedents of label
	FlowFlagsReferenced     FlowFlags = 1 << 11 // Referenced as antecedent once
	FlowFlagsShared         FlowFlags = 1 << 12 // Referenced as antecedent more than once
	FlowFlagsLabel                    = FlowFlagsBranchLabel | FlowFlagsLoopLabel
	FlowFlagsCondition                = FlowFlagsTrueCondition | FlowFlagsFalseCondition
)

type FlowLabel

type FlowLabel = FlowNode

type FlowList

type FlowList struct {
	Flow *FlowNode
	Next *FlowList
}

type FlowNode

type FlowNode struct {
	Flags       FlowFlags
	Node        *Node     // Associated AST node
	Antecedent  *FlowNode // Antecedent for all but FlowLabel
	Antecedents *FlowList // Linked list of antecedents for FlowLabel
}

type FlowNodeBase

type FlowNodeBase struct {
	FlowNode *FlowNode
}

func (*FlowNodeBase) FlowNodeData

func (node *FlowNodeBase) FlowNodeData() *FlowNodeBase

type FlowReduceLabelData

type FlowReduceLabelData struct {
	NodeBase
	Target      *FlowLabel // Target label
	Antecedents *FlowList  // Temporary antecedent list
}

type FlowSwitchClauseData

type FlowSwitchClauseData struct {
	NodeBase
	SwitchStatement *Node
	ClauseStart     int32 // Start index of case/default clause range
	ClauseEnd       int32 // End index of case/default clause range
}

func (*FlowSwitchClauseData) IsEmpty

func (node *FlowSwitchClauseData) IsEmpty() bool

type ForInOrOfStatement

type ForInOrOfStatement struct {
	StatementBase
	LocalsContainerBase
	AwaitModifier *TokenNode      // TokenNode. Optional
	Initializer   *ForInitializer // ForInitializer
	Expression    *Expression     // Expression
	Statement     *Statement      // Statement
}

func (*ForInOrOfStatement) Clone

func (node *ForInOrOfStatement) Clone(f *NodeFactory) *Node

func (*ForInOrOfStatement) ForEachChild

func (node *ForInOrOfStatement) ForEachChild(v Visitor) bool

func (*ForInOrOfStatement) VisitEachChild

func (node *ForInOrOfStatement) VisitEachChild(v *NodeVisitor) *Node

type ForInitializer

type ForInitializer = Node // Expression | MissingDeclaration | VariableDeclarationList

type ForStatement

type ForStatement struct {
	StatementBase
	LocalsContainerBase
	Initializer *ForInitializer // ForInitializer. Optional
	Condition   *Expression     // Expression. Optional
	Incrementor *Expression     // Expression. Optional
	Statement   *Statement      // Statement
}

func (*ForStatement) Clone

func (node *ForStatement) Clone(f *NodeFactory) *Node

func (*ForStatement) ForEachChild

func (node *ForStatement) ForEachChild(v Visitor) bool

func (*ForStatement) VisitEachChild

func (node *ForStatement) VisitEachChild(v *NodeVisitor) *Node

type FunctionDeclaration

type FunctionDeclaration struct {
	StatementBase
	DeclarationBase
	ExportableBase
	ModifiersBase
	FunctionLikeWithBodyBase

	ReturnFlowNode *FlowNode
	// contains filtered or unexported fields
}

func (*FunctionDeclaration) Clone

func (node *FunctionDeclaration) Clone(f *NodeFactory) *Node

func (*FunctionDeclaration) ForEachChild

func (node *FunctionDeclaration) ForEachChild(v Visitor) bool

func (*FunctionDeclaration) Name

func (node *FunctionDeclaration) Name() *DeclarationName

func (*FunctionDeclaration) VisitEachChild

func (node *FunctionDeclaration) VisitEachChild(v *NodeVisitor) *Node

type FunctionDeclarationNode

type FunctionDeclarationNode = Node

type FunctionExpression

type FunctionExpression struct {
	ExpressionBase
	DeclarationBase
	ModifiersBase
	FunctionLikeWithBodyBase
	FlowNodeBase

	ReturnFlowNode *FlowNode
	// contains filtered or unexported fields
}

func (*FunctionExpression) Clone

func (node *FunctionExpression) Clone(f *NodeFactory) *Node

func (*FunctionExpression) ForEachChild

func (node *FunctionExpression) ForEachChild(v Visitor) bool

func (*FunctionExpression) Name

func (node *FunctionExpression) Name() *DeclarationName

func (*FunctionExpression) VisitEachChild

func (node *FunctionExpression) VisitEachChild(v *NodeVisitor) *Node

type FunctionLikeBase

type FunctionLikeBase struct {
	LocalsContainerBase
	TypeParameters *NodeList // NodeList[*TypeParameterDeclarationNode]. Optional
	Parameters     *NodeList // NodeList[*ParameterDeclarationNode]
	Type           *TypeNode // Optional
}

func (*FunctionLikeBase) FunctionLikeData

func (node *FunctionLikeBase) FunctionLikeData() *FunctionLikeBase

func (*FunctionLikeBase) LocalsContainerData

func (node *FunctionLikeBase) LocalsContainerData() *LocalsContainerBase

type FunctionLikeWithBodyBase

type FunctionLikeWithBodyBase struct {
	FunctionLikeBase
	BodyBase
}

func (*FunctionLikeWithBodyBase) BodyData

func (node *FunctionLikeWithBodyBase) BodyData() *BodyBase

func (*FunctionLikeWithBodyBase) FunctionLikeData

func (node *FunctionLikeWithBodyBase) FunctionLikeData() *FunctionLikeBase

func (*FunctionLikeWithBodyBase) LocalsContainerData

func (node *FunctionLikeWithBodyBase) LocalsContainerData() *LocalsContainerBase

type FunctionOrConstructorTypeNodeBase

type FunctionOrConstructorTypeNodeBase struct {
	TypeNodeBase
	DeclarationBase
	ModifiersBase
	FunctionLikeBase
}

func (*FunctionOrConstructorTypeNodeBase) ForEachChild

func (node *FunctionOrConstructorTypeNodeBase) ForEachChild(v Visitor) bool

type FunctionTypeNode

type FunctionTypeNode struct {
	FunctionOrConstructorTypeNodeBase
}

func (*FunctionTypeNode) Clone

func (node *FunctionTypeNode) Clone(f *NodeFactory) *Node

func (*FunctionTypeNode) VisitEachChild

func (node *FunctionTypeNode) VisitEachChild(v *NodeVisitor) *Node

type GetAccessorDeclaration

type GetAccessorDeclaration struct {
	AccessorDeclarationBase
}

func (*GetAccessorDeclaration) Clone

func (node *GetAccessorDeclaration) Clone(f *NodeFactory) *Node

func (*GetAccessorDeclaration) VisitEachChild

func (node *GetAccessorDeclaration) VisitEachChild(v *NodeVisitor) *Node

type HeritageClause

type HeritageClause struct {
	NodeBase
	Token Kind
	Types *NodeList // NodeList[*ExpressionWithTypeArgumentsNode]
}

func (*HeritageClause) Clone

func (node *HeritageClause) Clone(f *NodeFactory) *Node

func (*HeritageClause) ForEachChild

func (node *HeritageClause) ForEachChild(v Visitor) bool

func (*HeritageClause) VisitEachChild

func (node *HeritageClause) VisitEachChild(v *NodeVisitor) *Node

type HeritageClauseList

type HeritageClauseList = NodeList // NodeList[*HeritageClause]

type HeritageClauseNode

type HeritageClauseNode = Node

type Identifier

type Identifier struct {
	ExpressionBase
	FlowNodeBase
	Text string
}

func (*Identifier) Clone

func (node *Identifier) Clone(f *NodeFactory) *Node

type IdentifierNode

type IdentifierNode = Node

type IfStatement

type IfStatement struct {
	StatementBase
	Expression    *Expression // Expression
	ThenStatement *Statement  // Statement
	ElseStatement *Statement  // Statement. Optional
}

func (*IfStatement) Clone

func (node *IfStatement) Clone(f *NodeFactory) *Node

func (*IfStatement) ForEachChild

func (node *IfStatement) ForEachChild(v Visitor) bool

func (*IfStatement) VisitEachChild

func (node *IfStatement) VisitEachChild(v *NodeVisitor) *Node

type ImportAttribute

type ImportAttribute struct {
	NodeBase

	Value *Expression // Expression
	// contains filtered or unexported fields
}

func (*ImportAttribute) Clone

func (node *ImportAttribute) Clone(f *NodeFactory) *Node

func (*ImportAttribute) ForEachChild

func (node *ImportAttribute) ForEachChild(v Visitor) bool

func (*ImportAttribute) Name

func (node *ImportAttribute) Name() *ImportAttributeName

func (*ImportAttribute) VisitEachChild

func (node *ImportAttribute) VisitEachChild(v *NodeVisitor) *Node

type ImportAttributeList

type ImportAttributeList = NodeList // NodeList[*ImportAttributeNode]

type ImportAttributeName

type ImportAttributeName = Node // Identifier | StringLiteral

type ImportAttributeNode

type ImportAttributeNode = Node

type ImportAttributes

type ImportAttributes struct {
	NodeBase
	Token      Kind
	Attributes *NodeList // NodeList[*ImportAttributeNode]
	MultiLine  bool
}

func (*ImportAttributes) Clone

func (node *ImportAttributes) Clone(f *NodeFactory) *Node

func (*ImportAttributes) ForEachChild

func (node *ImportAttributes) ForEachChild(v Visitor) bool

func (*ImportAttributes) VisitEachChild

func (node *ImportAttributes) VisitEachChild(v *NodeVisitor) *Node

type ImportAttributesNode

type ImportAttributesNode = Node

type ImportClause

type ImportClause struct {
	NodeBase
	DeclarationBase
	ExportableBase
	IsTypeOnly    bool
	NamedBindings *NamedImportBindings // NamedImportBindings. Optional, named bindings
	// contains filtered or unexported fields
}

func (*ImportClause) Clone

func (node *ImportClause) Clone(f *NodeFactory) *Node

func (*ImportClause) ForEachChild

func (node *ImportClause) ForEachChild(v Visitor) bool

func (*ImportClause) Name

func (node *ImportClause) Name() *DeclarationName

func (*ImportClause) VisitEachChild

func (node *ImportClause) VisitEachChild(v *NodeVisitor) *Node

type ImportClauseNode

type ImportClauseNode = Node

type ImportDeclaration

type ImportDeclaration struct {
	StatementBase
	ModifiersBase
	ImportClause    *ImportClauseNode     // ImportClauseNode. Optional
	ModuleSpecifier *Expression           // Expression
	Attributes      *ImportAttributesNode // ImportAttributesNode. Optional
}

func (*ImportDeclaration) Clone

func (node *ImportDeclaration) Clone(f *NodeFactory) *Node

func (*ImportDeclaration) ForEachChild

func (node *ImportDeclaration) ForEachChild(v Visitor) bool

func (*ImportDeclaration) VisitEachChild

func (node *ImportDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ImportEqualsDeclaration

type ImportEqualsDeclaration struct {
	StatementBase
	DeclarationBase
	ExportableBase
	ModifiersBase
	IsTypeOnly bool

	// 'EntityName' for an internal module reference, 'ExternalModuleReference' for an external
	// module reference.
	ModuleReference *ModuleReference // ModuleReference
	// contains filtered or unexported fields
}

func (*ImportEqualsDeclaration) Clone

func (node *ImportEqualsDeclaration) Clone(f *NodeFactory) *Node

func (*ImportEqualsDeclaration) ForEachChild

func (node *ImportEqualsDeclaration) ForEachChild(v Visitor) bool

func (*ImportEqualsDeclaration) Name

func (*ImportEqualsDeclaration) VisitEachChild

func (node *ImportEqualsDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ImportSpecifier

type ImportSpecifier struct {
	NodeBase
	DeclarationBase
	ExportableBase
	IsTypeOnly   bool
	PropertyName *ModuleExportName // ModuleExportName. Optional
	// contains filtered or unexported fields
}

func (*ImportSpecifier) Clone

func (node *ImportSpecifier) Clone(f *NodeFactory) *Node

func (*ImportSpecifier) ForEachChild

func (node *ImportSpecifier) ForEachChild(v Visitor) bool

func (*ImportSpecifier) Name

func (node *ImportSpecifier) Name() *DeclarationName

func (*ImportSpecifier) VisitEachChild

func (node *ImportSpecifier) VisitEachChild(v *NodeVisitor) *Node

type ImportSpecifierList

type ImportSpecifierList = NodeList // NodeList[*ImportSpecifier]

type ImportSpecifierNode

type ImportSpecifierNode = Node

type ImportTypeNode

type ImportTypeNode struct {
	TypeNodeBase
	IsTypeOf      bool
	Argument      *TypeNode             // TypeNode
	Attributes    *ImportAttributesNode // ImportAttributesNode. Optional
	Qualifier     *EntityName           // EntityName. Optional
	TypeArguments *NodeList             // NodeList[*TypeNode]. Optional
}

func (*ImportTypeNode) Clone

func (node *ImportTypeNode) Clone(f *NodeFactory) *Node

func (*ImportTypeNode) ForEachChild

func (node *ImportTypeNode) ForEachChild(v Visitor) bool

func (*ImportTypeNode) VisitEachChild

func (node *ImportTypeNode) VisitEachChild(v *NodeVisitor) *Node

type IndexSignatureDeclaration

func (*IndexSignatureDeclaration) Clone

func (node *IndexSignatureDeclaration) Clone(f *NodeFactory) *Node

func (*IndexSignatureDeclaration) ForEachChild

func (node *IndexSignatureDeclaration) ForEachChild(v Visitor) bool

func (*IndexSignatureDeclaration) VisitEachChild

func (node *IndexSignatureDeclaration) VisitEachChild(v *NodeVisitor) *Node

type IndexedAccessTypeNode

type IndexedAccessTypeNode struct {
	TypeNodeBase
	ObjectType *TypeNode // TypeNode
	IndexType  *TypeNode // TypeNode
}

func (*IndexedAccessTypeNode) Clone

func (node *IndexedAccessTypeNode) Clone(f *NodeFactory) *Node

func (*IndexedAccessTypeNode) ForEachChild

func (node *IndexedAccessTypeNode) ForEachChild(v Visitor) bool

func (*IndexedAccessTypeNode) VisitEachChild

func (node *IndexedAccessTypeNode) VisitEachChild(v *NodeVisitor) *Node

type InferTypeNode

type InferTypeNode struct {
	TypeNodeBase
	TypeParameter *TypeParameterDeclarationNode // TypeParameterDeclarationNode
}

func (*InferTypeNode) Clone

func (node *InferTypeNode) Clone(f *NodeFactory) *Node

func (*InferTypeNode) ForEachChild

func (node *InferTypeNode) ForEachChild(v Visitor) bool

func (*InferTypeNode) VisitEachChild

func (node *InferTypeNode) VisitEachChild(v *NodeVisitor) *Node

type InterfaceDeclaration

type InterfaceDeclaration struct {
	StatementBase
	DeclarationBase
	ExportableBase
	ModifiersBase

	TypeParameters  *NodeList // NodeList[*TypeParameterDeclarationNode]. Optional
	HeritageClauses *NodeList // NodeList[*HeritageClauseNode]. Optional
	Members         *NodeList // NodeList[*TypeElement]
	// contains filtered or unexported fields
}

func (*InterfaceDeclaration) Clone

func (node *InterfaceDeclaration) Clone(f *NodeFactory) *Node

func (*InterfaceDeclaration) ForEachChild

func (node *InterfaceDeclaration) ForEachChild(v Visitor) bool

func (*InterfaceDeclaration) Name

func (node *InterfaceDeclaration) Name() *DeclarationName

func (*InterfaceDeclaration) VisitEachChild

func (node *InterfaceDeclaration) VisitEachChild(v *NodeVisitor) *Node

type IntersectionTypeNode

type IntersectionTypeNode struct {
	UnionOrIntersectionTypeNodeBase
}

func (*IntersectionTypeNode) Clone

func (node *IntersectionTypeNode) Clone(f *NodeFactory) *Node

func (*IntersectionTypeNode) VisitEachChild

func (node *IntersectionTypeNode) VisitEachChild(v *NodeVisitor) *Node

type JSDoc

type JSDoc struct {
	NodeBase
	Comment *NodeList // NodeList[*JSDocCommentBase]
	Tags    *NodeList // NodeList[*JSDocTagBase]
}

func (*JSDoc) Clone

func (node *JSDoc) Clone(f *NodeFactory) *Node

func (*JSDoc) ForEachChild

func (node *JSDoc) ForEachChild(v Visitor) bool

func (*JSDoc) VisitEachChild

func (node *JSDoc) VisitEachChild(v *NodeVisitor) *Node

type JSDocAllType

type JSDocAllType struct {
	TypeNodeBase
}

func (*JSDocAllType) Clone

func (node *JSDocAllType) Clone(f *NodeFactory) *Node

type JSDocAugmentsTag

type JSDocAugmentsTag struct {
	JSDocTagBase
	ClassName *Expression
}

JSDocAugmentsTag

func (*JSDocAugmentsTag) Clone

func (node *JSDocAugmentsTag) Clone(f *NodeFactory) *Node

func (*JSDocAugmentsTag) ForEachChild

func (node *JSDocAugmentsTag) ForEachChild(v Visitor) bool

func (*JSDocAugmentsTag) VisitEachChild

func (node *JSDocAugmentsTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocCallbackTag

type JSDocCallbackTag struct {
	JSDocTagBase
	FullName       *Node
	TypeExpression *TypeNode
}

JSDocCallbackTag

func (*JSDocCallbackTag) Clone

func (node *JSDocCallbackTag) Clone(f *NodeFactory) *Node

func (*JSDocCallbackTag) ForEachChild

func (node *JSDocCallbackTag) ForEachChild(v Visitor) bool

func (*JSDocCallbackTag) VisitEachChild

func (node *JSDocCallbackTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocComment

type JSDocComment = Node // JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain;

type JSDocCommentBase

type JSDocCommentBase struct {
	NodeBase
	Text string
}

type JSDocDeprecatedTag

type JSDocDeprecatedTag struct {
	JSDocTagBase
}

JSDocDeprecatedTag

func (*JSDocDeprecatedTag) Clone

func (node *JSDocDeprecatedTag) Clone(f *NodeFactory) *Node

func (*JSDocDeprecatedTag) ForEachChild

func (node *JSDocDeprecatedTag) ForEachChild(v Visitor) bool

func (*JSDocDeprecatedTag) VisitEachChild

func (node *JSDocDeprecatedTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocImplementsTag

type JSDocImplementsTag struct {
	JSDocTagBase
	ClassName *Expression
}

JSDocImplementsTag

func (*JSDocImplementsTag) Clone

func (node *JSDocImplementsTag) Clone(f *NodeFactory) *Node

func (*JSDocImplementsTag) ForEachChild

func (node *JSDocImplementsTag) ForEachChild(v Visitor) bool

func (*JSDocImplementsTag) VisitEachChild

func (node *JSDocImplementsTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocImportTag

type JSDocImportTag struct {
	JSDocTagBase
	ImportClause    *Declaration
	ModuleSpecifier *Node
	Attributes      *Node
}

JSDocImportTag

func (*JSDocImportTag) Clone

func (node *JSDocImportTag) Clone(f *NodeFactory) *Node

func (*JSDocImportTag) ForEachChild

func (node *JSDocImportTag) ForEachChild(v Visitor) bool

func (*JSDocImportTag) VisitEachChild

func (node *JSDocImportTag) VisitEachChild(v *NodeVisitor) *Node
type JSDocLink struct {
	JSDocCommentBase
	// contains filtered or unexported fields
}

func (*JSDocLink) Clone

func (node *JSDocLink) Clone(f *NodeFactory) *Node

func (*JSDocLink) ForEachChild

func (node *JSDocLink) ForEachChild(v Visitor) bool

func (*JSDocLink) Name

func (node *JSDocLink) Name() *DeclarationName

func (*JSDocLink) VisitEachChild

func (node *JSDocLink) VisitEachChild(v *NodeVisitor) *Node

type JSDocLinkCode

type JSDocLinkCode struct {
	JSDocCommentBase
	// contains filtered or unexported fields
}

func (*JSDocLinkCode) Clone

func (node *JSDocLinkCode) Clone(f *NodeFactory) *Node

func (*JSDocLinkCode) ForEachChild

func (node *JSDocLinkCode) ForEachChild(v Visitor) bool

func (*JSDocLinkCode) Name

func (node *JSDocLinkCode) Name() *DeclarationName

func (*JSDocLinkCode) VisitEachChild

func (node *JSDocLinkCode) VisitEachChild(v *NodeVisitor) *Node

type JSDocLinkPlain

type JSDocLinkPlain struct {
	JSDocCommentBase
	// contains filtered or unexported fields
}

func (*JSDocLinkPlain) Clone

func (node *JSDocLinkPlain) Clone(f *NodeFactory) *Node

func (*JSDocLinkPlain) ForEachChild

func (node *JSDocLinkPlain) ForEachChild(v Visitor) bool

func (*JSDocLinkPlain) Name

func (node *JSDocLinkPlain) Name() *DeclarationName

func (*JSDocLinkPlain) VisitEachChild

func (node *JSDocLinkPlain) VisitEachChild(v *NodeVisitor) *Node

type JSDocNameReference

type JSDocNameReference struct {
	TypeNodeBase
	// contains filtered or unexported fields
}

JSDocNameReference

func (*JSDocNameReference) Clone

func (node *JSDocNameReference) Clone(f *NodeFactory) *Node

func (*JSDocNameReference) ForEachChild

func (node *JSDocNameReference) ForEachChild(v Visitor) bool

func (*JSDocNameReference) Name

func (node *JSDocNameReference) Name() *EntityName

func (*JSDocNameReference) VisitEachChild

func (node *JSDocNameReference) VisitEachChild(v *NodeVisitor) *Node

type JSDocNonNullableType

type JSDocNonNullableType struct {
	TypeNodeBase
	Type *TypeNode // TypeNode
}

func (*JSDocNonNullableType) Clone

func (node *JSDocNonNullableType) Clone(f *NodeFactory) *Node

func (*JSDocNonNullableType) ForEachChild

func (node *JSDocNonNullableType) ForEachChild(v Visitor) bool

func (*JSDocNonNullableType) VisitEachChild

func (node *JSDocNonNullableType) VisitEachChild(v *NodeVisitor) *Node

type JSDocNullableType

type JSDocNullableType struct {
	TypeNodeBase
	Type *TypeNode // TypeNode
}

func (*JSDocNullableType) Clone

func (node *JSDocNullableType) Clone(f *NodeFactory) *Node

func (*JSDocNullableType) ForEachChild

func (node *JSDocNullableType) ForEachChild(v Visitor) bool

func (*JSDocNullableType) VisitEachChild

func (node *JSDocNullableType) VisitEachChild(v *NodeVisitor) *Node

type JSDocOptionalType

type JSDocOptionalType struct {
	TypeNodeBase
	Type *TypeNode
}

func (*JSDocOptionalType) Clone

func (node *JSDocOptionalType) Clone(f *NodeFactory) *Node

func (*JSDocOptionalType) ForEachChild

func (node *JSDocOptionalType) ForEachChild(v Visitor) bool

func (*JSDocOptionalType) VisitEachChild

func (node *JSDocOptionalType) VisitEachChild(v *NodeVisitor) *Node

type JSDocOverloadTag

type JSDocOverloadTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

JSDocOverloadTag

func (*JSDocOverloadTag) Clone

func (node *JSDocOverloadTag) Clone(f *NodeFactory) *Node

func (*JSDocOverloadTag) ForEachChild

func (node *JSDocOverloadTag) ForEachChild(v Visitor) bool

func (*JSDocOverloadTag) VisitEachChild

func (node *JSDocOverloadTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocOverrideTag

type JSDocOverrideTag struct {
	JSDocTagBase
}

JSDocOverrideTag

func (*JSDocOverrideTag) Clone

func (node *JSDocOverrideTag) Clone(f *NodeFactory) *Node

func (*JSDocOverrideTag) ForEachChild

func (node *JSDocOverrideTag) ForEachChild(v Visitor) bool

func (*JSDocOverrideTag) VisitEachChild

func (node *JSDocOverrideTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocParameterTag

type JSDocParameterTag struct {
	JSDocTagBase

	IsBracketed    bool
	TypeExpression *TypeNode
	IsNameFirst    bool
	// contains filtered or unexported fields
}

func (*JSDocParameterTag) Clone

func (node *JSDocParameterTag) Clone(f *NodeFactory) *Node

func (*JSDocParameterTag) ForEachChild

func (node *JSDocParameterTag) ForEachChild(v Visitor) bool

func (*JSDocParameterTag) Name

func (node *JSDocParameterTag) Name() *EntityName

func (*JSDocParameterTag) VisitEachChild

func (node *JSDocParameterTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocPrivateTag

type JSDocPrivateTag struct {
	JSDocTagBase
}

JSDocPrivateTag

func (*JSDocPrivateTag) Clone

func (node *JSDocPrivateTag) Clone(f *NodeFactory) *Node

func (*JSDocPrivateTag) ForEachChild

func (node *JSDocPrivateTag) ForEachChild(v Visitor) bool

func (*JSDocPrivateTag) VisitEachChild

func (node *JSDocPrivateTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocPropertyTag

type JSDocPropertyTag struct {
	JSDocTagBase

	IsBracketed    bool
	TypeExpression *TypeNode
	IsNameFirst    bool
	// contains filtered or unexported fields
}

func (*JSDocPropertyTag) Clone

func (node *JSDocPropertyTag) Clone(f *NodeFactory) *Node

func (*JSDocPropertyTag) ForEachChild

func (node *JSDocPropertyTag) ForEachChild(v Visitor) bool

func (*JSDocPropertyTag) Name

func (node *JSDocPropertyTag) Name() *EntityName

func (*JSDocPropertyTag) VisitEachChild

func (node *JSDocPropertyTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocProtectedTag

type JSDocProtectedTag struct {
	JSDocTagBase
}

JSDocProtectedTag

func (*JSDocProtectedTag) Clone

func (node *JSDocProtectedTag) Clone(f *NodeFactory) *Node

func (*JSDocProtectedTag) ForEachChild

func (node *JSDocProtectedTag) ForEachChild(v Visitor) bool

func (*JSDocProtectedTag) VisitEachChild

func (node *JSDocProtectedTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocPublicTag

type JSDocPublicTag struct {
	JSDocTagBase
}

JSDocPublicTag

func (*JSDocPublicTag) Clone

func (node *JSDocPublicTag) Clone(f *NodeFactory) *Node

func (*JSDocPublicTag) ForEachChild

func (node *JSDocPublicTag) ForEachChild(v Visitor) bool

func (*JSDocPublicTag) VisitEachChild

func (node *JSDocPublicTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocReadonlyTag

type JSDocReadonlyTag struct {
	JSDocTagBase
}

JSDocReadonlyTag

func (*JSDocReadonlyTag) Clone

func (node *JSDocReadonlyTag) Clone(f *NodeFactory) *Node

func (*JSDocReadonlyTag) ForEachChild

func (node *JSDocReadonlyTag) ForEachChild(v Visitor) bool

func (*JSDocReadonlyTag) VisitEachChild

func (node *JSDocReadonlyTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocReturnTag

type JSDocReturnTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

JSDocReturnTag

func (*JSDocReturnTag) Clone

func (node *JSDocReturnTag) Clone(f *NodeFactory) *Node

func (*JSDocReturnTag) ForEachChild

func (node *JSDocReturnTag) ForEachChild(v Visitor) bool

func (*JSDocReturnTag) VisitEachChild

func (node *JSDocReturnTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocSatisfiesTag

type JSDocSatisfiesTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

JSDocSatisfiesTag

func (*JSDocSatisfiesTag) Clone

func (node *JSDocSatisfiesTag) Clone(f *NodeFactory) *Node

func (*JSDocSatisfiesTag) ForEachChild

func (node *JSDocSatisfiesTag) ForEachChild(v Visitor) bool

func (*JSDocSatisfiesTag) VisitEachChild

func (node *JSDocSatisfiesTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocSeeTag

type JSDocSeeTag struct {
	JSDocTagBase
	NameExpression *TypeNode
}

JSDocSeeTag

func (*JSDocSeeTag) Clone

func (node *JSDocSeeTag) Clone(f *NodeFactory) *Node

func (*JSDocSeeTag) ForEachChild

func (node *JSDocSeeTag) ForEachChild(v Visitor) bool

func (*JSDocSeeTag) VisitEachChild

func (node *JSDocSeeTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocSignature

type JSDocSignature struct {
	TypeNodeBase

	Parameters *NodeList
	Type       *JSDocTag
	// contains filtered or unexported fields
}

JSDocSignature

func (*JSDocSignature) Clone

func (node *JSDocSignature) Clone(f *NodeFactory) *Node

func (*JSDocSignature) ForEachChild

func (node *JSDocSignature) ForEachChild(v Visitor) bool

func (*JSDocSignature) TypeParameters

func (node *JSDocSignature) TypeParameters() *TypeParameterList

func (*JSDocSignature) VisitEachChild

func (node *JSDocSignature) VisitEachChild(v *NodeVisitor) *Node

type JSDocTag

type JSDocTag = Node // Node with JSDocTagBase

type JSDocTagBase

type JSDocTagBase struct {
	NodeBase
	TagName *IdentifierNode
	Comment *NodeList
}

type JSDocTemplateTag

type JSDocTemplateTag struct {
	JSDocTagBase
	Constraint *Node
	// contains filtered or unexported fields
}

JSDocTemplateTag

func (*JSDocTemplateTag) Clone

func (node *JSDocTemplateTag) Clone(f *NodeFactory) *Node

func (*JSDocTemplateTag) ForEachChild

func (node *JSDocTemplateTag) ForEachChild(v Visitor) bool

func (*JSDocTemplateTag) TypeParameters

func (node *JSDocTemplateTag) TypeParameters() *TypeParameterList

func (*JSDocTemplateTag) VisitEachChild

func (node *JSDocTemplateTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocText

type JSDocText struct {
	JSDocCommentBase
}

JSDoc comments

func (*JSDocText) Clone

func (node *JSDocText) Clone(f *NodeFactory) *Node

type JSDocThisTag

type JSDocThisTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

JSDocThisTag

func (*JSDocThisTag) Clone

func (node *JSDocThisTag) Clone(f *NodeFactory) *Node

func (*JSDocThisTag) ForEachChild

func (node *JSDocThisTag) ForEachChild(v Visitor) bool

func (*JSDocThisTag) VisitEachChild

func (node *JSDocThisTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocTypeExpression

type JSDocTypeExpression struct {
	TypeNodeBase
	Type *TypeNode
}

func (*JSDocTypeExpression) Clone

func (node *JSDocTypeExpression) Clone(f *NodeFactory) *Node

func (*JSDocTypeExpression) ForEachChild

func (node *JSDocTypeExpression) ForEachChild(v Visitor) bool

func (*JSDocTypeExpression) VisitEachChild

func (node *JSDocTypeExpression) VisitEachChild(v *NodeVisitor) *Node

type JSDocTypeLiteral

type JSDocTypeLiteral struct {
	TypeNodeBase
	DeclarationBase
	JsDocPropertyTags []*Node
	IsArrayType       bool
}

JSDocTypeLiteral

func (*JSDocTypeLiteral) Clone

func (node *JSDocTypeLiteral) Clone(f *NodeFactory) *Node

func (*JSDocTypeLiteral) ForEachChild

func (node *JSDocTypeLiteral) ForEachChild(v Visitor) bool

func (*JSDocTypeLiteral) VisitEachChild

func (node *JSDocTypeLiteral) VisitEachChild(v *NodeVisitor) *Node

type JSDocTypeTag

type JSDocTypeTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

func (*JSDocTypeTag) Clone

func (node *JSDocTypeTag) Clone(f *NodeFactory) *Node

func (*JSDocTypeTag) ForEachChild

func (node *JSDocTypeTag) ForEachChild(v Visitor) bool

func (*JSDocTypeTag) VisitEachChild

func (node *JSDocTypeTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocTypedefTag

type JSDocTypedefTag struct {
	JSDocTagBase
	TypeExpression *Node
	FullName       *Node
}

JSDocTypedefTag

func (*JSDocTypedefTag) Clone

func (node *JSDocTypedefTag) Clone(f *NodeFactory) *Node

func (*JSDocTypedefTag) ForEachChild

func (node *JSDocTypedefTag) ForEachChild(v Visitor) bool

func (*JSDocTypedefTag) VisitEachChild

func (node *JSDocTypedefTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocUnknownTag

type JSDocUnknownTag struct {
	JSDocTagBase
}

JSDocUnknownTag

func (*JSDocUnknownTag) Clone

func (node *JSDocUnknownTag) Clone(f *NodeFactory) *Node

func (*JSDocUnknownTag) ForEachChild

func (node *JSDocUnknownTag) ForEachChild(v Visitor) bool

func (*JSDocUnknownTag) VisitEachChild

func (node *JSDocUnknownTag) VisitEachChild(v *NodeVisitor) *Node

type JSDocVariadicType

type JSDocVariadicType struct {
	TypeNodeBase
	Type *TypeNode
}

func (*JSDocVariadicType) Clone

func (node *JSDocVariadicType) Clone(f *NodeFactory) *Node

func (*JSDocVariadicType) ForEachChild

func (node *JSDocVariadicType) ForEachChild(v Visitor) bool

func (*JSDocVariadicType) VisitEachChild

func (node *JSDocVariadicType) VisitEachChild(v *NodeVisitor) *Node

type JsxAttribute

type JsxAttribute struct {
	NodeBase
	DeclarationBase

	Initializer *JsxAttributeValue // JsxAttributeValue. Optional, <X y /> is sugar for <X y={true} />
	// contains filtered or unexported fields
}

func (*JsxAttribute) Clone

func (node *JsxAttribute) Clone(f *NodeFactory) *Node

func (*JsxAttribute) ForEachChild

func (node *JsxAttribute) ForEachChild(v Visitor) bool

func (*JsxAttribute) Name

func (node *JsxAttribute) Name() *JsxAttributeName

func (*JsxAttribute) VisitEachChild

func (node *JsxAttribute) VisitEachChild(v *NodeVisitor) *Node

type JsxAttributeLike

type JsxAttributeLike = Node // JsxAttribute | JsxSpreadAttribute

type JsxAttributeList

type JsxAttributeList = NodeList // NodeList[*JsxAttributeLike]

type JsxAttributeName

type JsxAttributeName = Node // Identifier | JsxNamespacedName

type JsxAttributeValue

type JsxAttributeValue = Node // StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment

type JsxAttributes

type JsxAttributes struct {
	ExpressionBase
	DeclarationBase
	Properties *NodeList // NodeList[*JsxAttributeLike]
}

JsxAttributes

func (*JsxAttributes) Clone

func (node *JsxAttributes) Clone(f *NodeFactory) *Node

func (*JsxAttributes) ForEachChild

func (node *JsxAttributes) ForEachChild(v Visitor) bool

func (*JsxAttributes) VisitEachChild

func (node *JsxAttributes) VisitEachChild(v *NodeVisitor) *Node

type JsxAttributesNode

type JsxAttributesNode = Node

type JsxChild

type JsxChild = Node // JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment

type JsxChildList

type JsxChildList = NodeList // NodeList[*JsxChild]

type JsxClosingElement

type JsxClosingElement struct {
	NodeBase
	TagName *JsxTagNameExpression // JsxTagNameExpression
}

func (*JsxClosingElement) Clone

func (node *JsxClosingElement) Clone(f *NodeFactory) *Node

func (*JsxClosingElement) ForEachChild

func (node *JsxClosingElement) ForEachChild(v Visitor) bool

func (*JsxClosingElement) VisitEachChild

func (node *JsxClosingElement) VisitEachChild(v *NodeVisitor) *Node

type JsxClosingElementNode

type JsxClosingElementNode = Node

type JsxClosingFragment

type JsxClosingFragment struct {
	ExpressionBase
}

func (*JsxClosingFragment) Clone

func (node *JsxClosingFragment) Clone(f *NodeFactory) *Node

type JsxClosingFragmentNode

type JsxClosingFragmentNode = Node

type JsxElement

type JsxElement struct {
	ExpressionBase
	OpeningElement *JsxOpeningElementNode // JsxOpeningElementNode
	Children       *NodeList              // NodeList[*JsxChild]
	ClosingElement *JsxClosingElementNode // JsxClosingElementNode
}

func (*JsxElement) Clone

func (node *JsxElement) Clone(f *NodeFactory) *Node

func (*JsxElement) ForEachChild

func (node *JsxElement) ForEachChild(v Visitor) bool

func (*JsxElement) VisitEachChild

func (node *JsxElement) VisitEachChild(v *NodeVisitor) *Node

type JsxExpression

type JsxExpression struct {
	ExpressionBase
	DotDotDotToken *TokenNode  // TokenNode. Optional
	Expression     *Expression // Expression
}

func (*JsxExpression) Clone

func (node *JsxExpression) Clone(f *NodeFactory) *Node

func (*JsxExpression) ForEachChild

func (node *JsxExpression) ForEachChild(v Visitor) bool

func (*JsxExpression) VisitEachChild

func (node *JsxExpression) VisitEachChild(v *NodeVisitor) *Node

type JsxFragment

type JsxFragment struct {
	ExpressionBase
	OpeningFragment *JsxOpeningFragmentNode // JsxOpeningFragmentNode
	Children        *NodeList               // NodeList[*JsxChild]
	ClosingFragment *JsxClosingFragmentNode // JsxClosingFragmentNode
}

func (*JsxFragment) Clone

func (node *JsxFragment) Clone(f *NodeFactory) *Node

func (*JsxFragment) ForEachChild

func (node *JsxFragment) ForEachChild(v Visitor) bool

func (*JsxFragment) VisitEachChild

func (node *JsxFragment) VisitEachChild(v *NodeVisitor) *Node

type JsxNamespacedName

type JsxNamespacedName struct {
	ExpressionBase

	Namespace *IdentifierNode // IdentifierNode
	// contains filtered or unexported fields
}

func (*JsxNamespacedName) Clone

func (node *JsxNamespacedName) Clone(f *NodeFactory) *Node

func (*JsxNamespacedName) ForEachChild

func (node *JsxNamespacedName) ForEachChild(v Visitor) bool

func (*JsxNamespacedName) Name

func (node *JsxNamespacedName) Name() *DeclarationName

func (*JsxNamespacedName) VisitEachChild

func (node *JsxNamespacedName) VisitEachChild(v *NodeVisitor) *Node

type JsxOpeningElement

type JsxOpeningElement struct {
	ExpressionBase
	TagName       *JsxTagNameExpression // JsxTagNameExpression (Identifier | KeywordExpression | JsxTagNamePropertyAccess | JsxNamespacedName)
	TypeArguments *NodeList             // NodeList[*TypeNode]. Optional
	Attributes    *JsxAttributesNode    // JsxAttributesNode
}

func (*JsxOpeningElement) Clone

func (node *JsxOpeningElement) Clone(f *NodeFactory) *Node

func (*JsxOpeningElement) ForEachChild

func (node *JsxOpeningElement) ForEachChild(v Visitor) bool

func (*JsxOpeningElement) VisitEachChild

func (node *JsxOpeningElement) VisitEachChild(v *NodeVisitor) *Node

type JsxOpeningElementNode

type JsxOpeningElementNode = Node

type JsxOpeningFragment

type JsxOpeningFragment struct {
	ExpressionBase
}

func (*JsxOpeningFragment) Clone

func (node *JsxOpeningFragment) Clone(f *NodeFactory) *Node

type JsxOpeningFragmentNode

type JsxOpeningFragmentNode = Node

type JsxSelfClosingElement

type JsxSelfClosingElement struct {
	ExpressionBase
	TagName       *JsxTagNameExpression // JsxTagNameExpression (IdentifierReference | KeywordExpression | JsxTagNamePropertyAccess | JsxNamespacedName)
	TypeArguments *NodeList             // NodeList[*TypeNode]. Optional
	Attributes    *JsxAttributesNode    // JsxAttributesNode
}

func (*JsxSelfClosingElement) Clone

func (node *JsxSelfClosingElement) Clone(f *NodeFactory) *Node

func (*JsxSelfClosingElement) ForEachChild

func (node *JsxSelfClosingElement) ForEachChild(v Visitor) bool

func (*JsxSelfClosingElement) VisitEachChild

func (node *JsxSelfClosingElement) VisitEachChild(v *NodeVisitor) *Node

type JsxSpreadAttribute

type JsxSpreadAttribute struct {
	NodeBase
	Expression *Expression // Expression
}

func (*JsxSpreadAttribute) Clone

func (node *JsxSpreadAttribute) Clone(f *NodeFactory) *Node

func (*JsxSpreadAttribute) ForEachChild

func (node *JsxSpreadAttribute) ForEachChild(v Visitor) bool

func (*JsxSpreadAttribute) VisitEachChild

func (node *JsxSpreadAttribute) VisitEachChild(v *NodeVisitor) *Node

type JsxTagNameExpression

type JsxTagNameExpression = Node // IdentifierReference | KeywordExpression | JsxTagNamePropertyAccess | JsxNamespacedName

type JsxText

type JsxText struct {
	ExpressionBase
	LiteralLikeBase
	ContainsOnlyTriviaWhiteSpaces bool
}

func (*JsxText) Clone

func (node *JsxText) Clone(f *NodeFactory) *Node

type KeywordExpression

type KeywordExpression struct {
	ExpressionBase
	FlowNodeBase // For 'this' and 'super' expressions
}

func (*KeywordExpression) Clone

func (node *KeywordExpression) Clone(f *NodeFactory) *Node

type KeywordTypeNode

type KeywordTypeNode struct {
	TypeNodeBase
}

func (*KeywordTypeNode) Clone

func (node *KeywordTypeNode) Clone(f *NodeFactory) *Node

type Kind

type Kind int16
const (
	KindUnknown Kind = iota
	KindEndOfFile
	KindSingleLineCommentTrivia
	KindMultiLineCommentTrivia
	KindNewLineTrivia
	KindWhitespaceTrivia
	KindConflictMarkerTrivia
	KindNonTextFileMarkerTrivia
	KindNumericLiteral
	KindBigIntLiteral
	KindStringLiteral
	KindJsxText
	KindJsxTextAllWhiteSpaces
	KindRegularExpressionLiteral
	KindNoSubstitutionTemplateLiteral
	// Pseudo-literals
	KindTemplateHead
	KindTemplateMiddle
	KindTemplateTail
	// Punctuation
	KindOpenBraceToken
	KindCloseBraceToken
	KindOpenParenToken
	KindCloseParenToken
	KindOpenBracketToken
	KindCloseBracketToken
	KindDotToken
	KindDotDotDotToken
	KindSemicolonToken
	KindCommaToken
	KindQuestionDotToken
	KindLessThanToken
	KindLessThanSlashToken
	KindGreaterThanToken
	KindLessThanEqualsToken
	KindGreaterThanEqualsToken
	KindEqualsEqualsToken
	KindExclamationEqualsToken
	KindEqualsEqualsEqualsToken
	KindExclamationEqualsEqualsToken
	KindEqualsGreaterThanToken
	KindPlusToken
	KindMinusToken
	KindAsteriskToken
	KindAsteriskAsteriskToken
	KindSlashToken
	KindPercentToken
	KindPlusPlusToken
	KindMinusMinusToken
	KindLessThanLessThanToken
	KindGreaterThanGreaterThanToken
	KindGreaterThanGreaterThanGreaterThanToken
	KindAmpersandToken
	KindBarToken
	KindCaretToken
	KindExclamationToken
	KindTildeToken
	KindAmpersandAmpersandToken
	KindBarBarToken
	KindQuestionToken
	KindColonToken
	KindAtToken
	KindQuestionQuestionToken
	/** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */
	KindBacktickToken
	/** Only the JSDoc scanner produces HashToken. The normal scanner produces PrivateIdentifier. */
	KindHashToken
	// Assignments
	KindEqualsToken
	KindPlusEqualsToken
	KindMinusEqualsToken
	KindAsteriskEqualsToken
	KindAsteriskAsteriskEqualsToken
	KindSlashEqualsToken
	KindPercentEqualsToken
	KindLessThanLessThanEqualsToken
	KindGreaterThanGreaterThanEqualsToken
	KindGreaterThanGreaterThanGreaterThanEqualsToken
	KindAmpersandEqualsToken
	KindBarEqualsToken
	KindBarBarEqualsToken
	KindAmpersandAmpersandEqualsToken
	KindQuestionQuestionEqualsToken
	KindCaretEqualsToken
	// Identifiers and PrivateIdentifier
	KindIdentifier
	KindPrivateIdentifier
	KindJSDocCommentTextToken
	// Reserved words
	KindBreakKeyword
	KindCaseKeyword
	KindCatchKeyword
	KindClassKeyword
	KindConstKeyword
	KindContinueKeyword
	KindDebuggerKeyword
	KindDefaultKeyword
	KindDeleteKeyword
	KindDoKeyword
	KindElseKeyword
	KindEnumKeyword
	KindExportKeyword
	KindExtendsKeyword
	KindFalseKeyword
	KindFinallyKeyword
	KindForKeyword
	KindFunctionKeyword
	KindIfKeyword
	KindImportKeyword
	KindInKeyword
	KindInstanceOfKeyword
	KindNewKeyword
	KindNullKeyword
	KindReturnKeyword
	KindSuperKeyword
	KindSwitchKeyword
	KindThisKeyword
	KindThrowKeyword
	KindTrueKeyword
	KindTryKeyword
	KindTypeOfKeyword
	KindVarKeyword
	KindVoidKeyword
	KindWhileKeyword
	KindWithKeyword
	// Strict mode reserved words
	KindImplementsKeyword
	KindInterfaceKeyword
	KindLetKeyword
	KindPackageKeyword
	KindPrivateKeyword
	KindProtectedKeyword
	KindPublicKeyword
	KindStaticKeyword
	KindYieldKeyword
	// Contextual keywords
	KindAbstractKeyword
	KindAccessorKeyword
	KindAsKeyword
	KindAssertsKeyword
	KindAssertKeyword
	KindAnyKeyword
	KindAsyncKeyword
	KindAwaitKeyword
	KindBooleanKeyword
	KindConstructorKeyword
	KindDeclareKeyword
	KindGetKeyword
	KindImmediateKeyword
	KindInferKeyword
	KindIntrinsicKeyword
	KindIsKeyword
	KindKeyOfKeyword
	KindModuleKeyword
	KindNamespaceKeyword
	KindNeverKeyword
	KindOutKeyword
	KindReadonlyKeyword
	KindRequireKeyword
	KindNumberKeyword
	KindObjectKeyword
	KindSatisfiesKeyword
	KindSetKeyword
	KindStringKeyword
	KindSymbolKeyword
	KindTypeKeyword
	KindUndefinedKeyword
	KindUniqueKeyword
	KindUnknownKeyword
	KindUsingKeyword
	KindFromKeyword
	KindGlobalKeyword
	KindBigIntKeyword
	KindOverrideKeyword
	KindOfKeyword // LastKeyword and LastToken and LastContextualKeyword
	// Parse tree nodes
	// Names
	KindQualifiedName
	KindComputedPropertyName
	// Signature elements
	KindTypeParameter
	KindParameter
	KindDecorator
	// TypeMember
	KindPropertySignature
	KindPropertyDeclaration
	KindMethodSignature
	KindMethodDeclaration
	KindClassStaticBlockDeclaration
	KindConstructor
	KindGetAccessor
	KindSetAccessor
	KindCallSignature
	KindConstructSignature
	KindIndexSignature
	// Type
	KindTypePredicate
	KindTypeReference
	KindFunctionType
	KindConstructorType
	KindTypeQuery
	KindTypeLiteral
	KindArrayType
	KindTupleType
	KindOptionalType
	KindRestType
	KindUnionType
	KindIntersectionType
	KindConditionalType
	KindInferType
	KindParenthesizedType
	KindThisType
	KindTypeOperator
	KindIndexedAccessType
	KindMappedType
	KindLiteralType
	KindNamedTupleMember
	KindTemplateLiteralType
	KindTemplateLiteralTypeSpan
	KindImportType
	// Binding patterns
	KindObjectBindingPattern
	KindArrayBindingPattern
	KindBindingElement
	// Expression
	KindArrayLiteralExpression
	KindObjectLiteralExpression
	KindPropertyAccessExpression
	KindElementAccessExpression
	KindCallExpression
	KindNewExpression
	KindTaggedTemplateExpression
	KindTypeAssertionExpression
	KindParenthesizedExpression
	KindFunctionExpression
	KindArrowFunction
	KindDeleteExpression
	KindTypeOfExpression
	KindVoidExpression
	KindAwaitExpression
	KindPrefixUnaryExpression
	KindPostfixUnaryExpression
	KindBinaryExpression
	KindConditionalExpression
	KindTemplateExpression
	KindYieldExpression
	KindSpreadElement
	KindClassExpression
	KindOmittedExpression
	KindExpressionWithTypeArguments
	KindAsExpression
	KindNonNullExpression
	KindMetaProperty
	KindSyntheticExpression
	KindSatisfiesExpression
	// Misc
	KindTemplateSpan
	KindSemicolonClassElement
	// Element
	KindBlock
	KindEmptyStatement
	KindVariableStatement
	KindExpressionStatement
	KindIfStatement
	KindDoStatement
	KindWhileStatement
	KindForStatement
	KindForInStatement
	KindForOfStatement
	KindContinueStatement
	KindBreakStatement
	KindReturnStatement
	KindWithStatement
	KindSwitchStatement
	KindLabeledStatement
	KindThrowStatement
	KindTryStatement
	KindDebuggerStatement
	KindVariableDeclaration
	KindVariableDeclarationList
	KindFunctionDeclaration
	KindClassDeclaration
	KindInterfaceDeclaration
	KindTypeAliasDeclaration
	KindEnumDeclaration
	KindModuleDeclaration
	KindModuleBlock
	KindCaseBlock
	KindNamespaceExportDeclaration
	KindImportEqualsDeclaration
	KindImportDeclaration
	KindImportClause
	KindNamespaceImport
	KindNamedImports
	KindImportSpecifier
	KindExportAssignment
	KindExportDeclaration
	KindNamedExports
	KindNamespaceExport
	KindExportSpecifier
	KindMissingDeclaration
	// Module references
	KindExternalModuleReference
	// JSX
	KindJsxElement
	KindJsxSelfClosingElement
	KindJsxOpeningElement
	KindJsxClosingElement
	KindJsxFragment
	KindJsxOpeningFragment
	KindJsxClosingFragment
	KindJsxAttribute
	KindJsxAttributes
	KindJsxSpreadAttribute
	KindJsxExpression
	KindJsxNamespacedName
	// Clauses
	KindCaseClause
	KindDefaultClause
	KindHeritageClause
	KindCatchClause
	// Import attributes
	KindImportAttributes
	KindImportAttribute
	// Property assignments
	KindPropertyAssignment
	KindShorthandPropertyAssignment
	KindSpreadAssignment
	// Enum
	KindEnumMember
	// Top-level nodes
	KindSourceFile
	KindBundle
	// JSDoc nodes
	KindJSDocTypeExpression
	KindJSDocNameReference
	KindJSDocMemberName // C#p
	KindJSDocAllType    // The * type
	KindJSDocNullableType
	KindJSDocNonNullableType
	KindJSDocOptionalType
	KindJSDocVariadicType
	KindJSDoc
	KindJSDocText
	KindJSDocTypeLiteral
	KindJSDocSignature
	KindJSDocLink
	KindJSDocLinkCode
	KindJSDocLinkPlain
	KindJSDocTag
	KindJSDocAugmentsTag
	KindJSDocImplementsTag
	KindJSDocDeprecatedTag
	KindJSDocPublicTag
	KindJSDocPrivateTag
	KindJSDocProtectedTag
	KindJSDocReadonlyTag
	KindJSDocOverrideTag
	KindJSDocCallbackTag
	KindJSDocOverloadTag
	KindJSDocParameterTag
	KindJSDocReturnTag
	KindJSDocThisTag
	KindJSDocTypeTag
	KindJSDocTemplateTag
	KindJSDocTypedefTag
	KindJSDocSeeTag
	KindJSDocPropertyTag
	KindJSDocSatisfiesTag
	KindJSDocImportTag
	// Synthesized list
	KindSyntaxList
	// Transformation nodes
	KindNotEmittedStatement
	KindPartiallyEmittedExpression
	KindCommaListExpression
	KindSyntheticReferenceExpression
	// Enum value count
	KindCount
	// Markers
	KindFirstAssignment         = KindEqualsToken
	KindLastAssignment          = KindCaretEqualsToken
	KindFirstCompoundAssignment = KindPlusEqualsToken
	KindLastCompoundAssignment  = KindCaretEqualsToken
	KindFirstReservedWord       = KindBreakKeyword
	KindLastReservedWord        = KindWithKeyword
	KindFirstKeyword            = KindBreakKeyword
	KindLastKeyword             = KindOfKeyword
	KindFirstFutureReservedWord = KindImplementsKeyword
	KindLastFutureReservedWord  = KindYieldKeyword
	KindFirstTypeNode           = KindTypePredicate
	KindLastTypeNode            = KindImportType
	KindFirstPunctuation        = KindOpenBraceToken
	KindLastPunctuation         = KindCaretEqualsToken
	KindFirstToken              = KindUnknown
	KindLastToken               = KindLastKeyword
	KindFirstLiteralToken       = KindNumericLiteral
	KindLastLiteralToken        = KindNoSubstitutionTemplateLiteral
	KindFirstTemplateToken      = KindNoSubstitutionTemplateLiteral
	KindLastTemplateToken       = KindTemplateTail
	KindFirstBinaryOperator     = KindLessThanToken
	KindLastBinaryOperator      = KindCaretEqualsToken
	KindFirstStatement          = KindVariableStatement
	KindLastStatement           = KindDebuggerStatement
	KindFirstNode               = KindQualifiedName
	KindFirstJSDocNode          = KindJSDocTypeExpression
	KindLastJSDocNode           = KindJSDocImportTag
	KindFirstJSDocTagNode       = KindJSDocTag
	KindLastJSDocTagNode        = KindJSDocImportTag
	KindFirstContextualKeyword  = KindAbstractKeyword
	KindLastContextualKeyword   = KindOfKeyword
	KindComment                 = KindSingleLineCommentTrivia | KindMultiLineCommentTrivia
)

func (Kind) String

func (i Kind) String() string

type LabeledStatement

type LabeledStatement struct {
	StatementBase
	Label     *IdentifierNode // IdentifierNode
	Statement *Statement      // Statement
}

func (*LabeledStatement) Clone

func (node *LabeledStatement) Clone(f *NodeFactory) *Node

func (*LabeledStatement) ForEachChild

func (node *LabeledStatement) ForEachChild(v Visitor) bool

func (*LabeledStatement) VisitEachChild

func (node *LabeledStatement) VisitEachChild(v *NodeVisitor) *Node

type LeftHandSideExpression

type LeftHandSideExpression = Node // subset of Expression

type LiteralExpression

type LiteralExpression = Node // StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | NoSubstitutionTemplateLiteral

type LiteralLikeBase

type LiteralLikeBase struct {
	Text       string
	TokenFlags TokenFlags
}

func (*LiteralLikeBase) LiteralLikeData

func (node *LiteralLikeBase) LiteralLikeData() *LiteralLikeBase

type LiteralLikeNode

type LiteralLikeNode = Node // StringLiteral | NumericLiteral | BigIntLiteral | RegularExpressionLiteral | TemplateLiteralLikeNode | JsxText

type LiteralTypeNode

type LiteralTypeNode struct {
	TypeNodeBase
	Literal *Node // KeywordExpression | LiteralExpression | PrefixUnaryExpression
}

func (*LiteralTypeNode) Clone

func (node *LiteralTypeNode) Clone(f *NodeFactory) *Node

func (*LiteralTypeNode) ForEachChild

func (node *LiteralTypeNode) ForEachChild(v Visitor) bool

func (*LiteralTypeNode) VisitEachChild

func (node *LiteralTypeNode) VisitEachChild(v *NodeVisitor) *Node

type LocalsContainerBase

type LocalsContainerBase struct {
	Locals        SymbolTable // Locals associated with node (initialized by binding)
	NextContainer *Node       // Next container in declaration order (initialized by binding)
}

func (*LocalsContainerBase) LocalsContainerData

func (node *LocalsContainerBase) LocalsContainerData() *LocalsContainerBase

type MappedTypeNode

type MappedTypeNode struct {
	TypeNodeBase
	DeclarationBase
	LocalsContainerBase
	ReadonlyToken *TokenNode                    // TokenNode. Optional
	TypeParameter *TypeParameterDeclarationNode // TypeParameterDeclarationNode
	NameType      *TypeNode                     // TypeNode. Optional
	QuestionToken *TokenNode                    // TokenNode. Optional
	Type          *TypeNode                     // TypeNode. Optional (error if missing)
	Members       *NodeList                     // NodeList[*TypeElement]. Used only to produce grammar errors
}

func (*MappedTypeNode) Clone

func (node *MappedTypeNode) Clone(f *NodeFactory) *Node

func (*MappedTypeNode) ForEachChild

func (node *MappedTypeNode) ForEachChild(v Visitor) bool

func (*MappedTypeNode) VisitEachChild

func (node *MappedTypeNode) VisitEachChild(v *NodeVisitor) *Node

type MemberName

type MemberName = Node // Identifier | PrivateIdentifier

type MetaProperty

type MetaProperty struct {
	ExpressionBase
	FlowNodeBase
	KeywordToken Kind // NewKeyword | ImportKeyword
	// contains filtered or unexported fields
}

func (*MetaProperty) Clone

func (node *MetaProperty) Clone(f *NodeFactory) *Node

func (*MetaProperty) ForEachChild

func (node *MetaProperty) ForEachChild(v Visitor) bool

func (*MetaProperty) Name

func (node *MetaProperty) Name() *DeclarationName

func (*MetaProperty) VisitEachChild

func (node *MetaProperty) VisitEachChild(v *NodeVisitor) *Node

type MethodDeclaration

func (*MethodDeclaration) Clone

func (node *MethodDeclaration) Clone(f *NodeFactory) *Node

func (*MethodDeclaration) ForEachChild

func (node *MethodDeclaration) ForEachChild(v Visitor) bool

func (*MethodDeclaration) VisitEachChild

func (node *MethodDeclaration) VisitEachChild(v *NodeVisitor) *Node

type MethodSignatureDeclaration

type MethodSignatureDeclaration struct {
	NodeBase
	NamedMemberBase
	FunctionLikeBase
	TypeElementBase
}

func (*MethodSignatureDeclaration) Clone

func (node *MethodSignatureDeclaration) Clone(f *NodeFactory) *Node

func (*MethodSignatureDeclaration) ForEachChild

func (node *MethodSignatureDeclaration) ForEachChild(v Visitor) bool

func (*MethodSignatureDeclaration) VisitEachChild

func (node *MethodSignatureDeclaration) VisitEachChild(v *NodeVisitor) *Node

type MissingDeclaration

type MissingDeclaration struct {
	StatementBase
	DeclarationBase
	ModifiersBase
}

func (*MissingDeclaration) Clone

func (node *MissingDeclaration) Clone(f *NodeFactory) *Node

func (*MissingDeclaration) ForEachChild

func (node *MissingDeclaration) ForEachChild(v Visitor) bool

func (*MissingDeclaration) VisitEachChild

func (node *MissingDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ModifierFlags

type ModifierFlags uint32

func GetCombinedModifierFlags

func GetCombinedModifierFlags(node *Node) ModifierFlags

func ModifierToFlag

func ModifierToFlag(token Kind) ModifierFlags

func ModifiersToFlags

func ModifiersToFlags(modifiers []*Node) ModifierFlags

type ModifierLike

type ModifierLike = Node // Modifier | Decorator

type ModifierList

type ModifierList struct {
	NodeList
	ModifierFlags ModifierFlags
}

func (*ModifierList) Clone

func (list *ModifierList) Clone(f *NodeFactory) *ModifierList

type ModifiersBase

type ModifiersBase struct {
	// contains filtered or unexported fields
}

func (*ModifiersBase) Modifiers

func (node *ModifiersBase) Modifiers() *ModifierList

type ModuleBlock

type ModuleBlock struct {
	StatementBase
	Statements *NodeList // NodeList[*Statement]
}

func (*ModuleBlock) Clone

func (node *ModuleBlock) Clone(f *NodeFactory) *Node

func (*ModuleBlock) ForEachChild

func (node *ModuleBlock) ForEachChild(v Visitor) bool

func (*ModuleBlock) VisitEachChild

func (node *ModuleBlock) VisitEachChild(v *NodeVisitor) *Node

type ModuleBody

type ModuleBody = Node // ModuleBlock | ModuleDeclaration

type ModuleDeclaration

type ModuleDeclaration struct {
	StatementBase
	DeclarationBase
	ExportableBase
	ModifiersBase
	LocalsContainerBase
	BodyBase
	// contains filtered or unexported fields
}

func (*ModuleDeclaration) Clone

func (node *ModuleDeclaration) Clone(f *NodeFactory) *Node

func (*ModuleDeclaration) ForEachChild

func (node *ModuleDeclaration) ForEachChild(v Visitor) bool

func (*ModuleDeclaration) Name

func (node *ModuleDeclaration) Name() *DeclarationName

func (*ModuleDeclaration) VisitEachChild

func (node *ModuleDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ModuleDeclarationNode

type ModuleDeclarationNode = Node

type ModuleExportName

type ModuleExportName = Node // Identifier | StringLiteral

type ModuleInstanceState

type ModuleInstanceState int32
const (
	ModuleInstanceStateUnknown ModuleInstanceState = iota
	ModuleInstanceStateNonInstantiated
	ModuleInstanceStateInstantiated
	ModuleInstanceStateConstEnumOnly
)

func GetModuleInstanceState

func GetModuleInstanceState(node *Node) ModuleInstanceState

type ModuleName

type ModuleName = Node // Identifier | StringLiteral

type ModuleReference

type ModuleReference = Node // Identifier | QualifiedName | ExternalModuleReference

type NamedExportBindings

type NamedExportBindings = Node // NamespaceExport | NamedExports

type NamedExports

type NamedExports struct {
	NodeBase
	Elements *NodeList // NodeList[*ExportSpecifierNode]
}

func (*NamedExports) Clone

func (node *NamedExports) Clone(f *NodeFactory) *Node

func (*NamedExports) ForEachChild

func (node *NamedExports) ForEachChild(v Visitor) bool

func (*NamedExports) VisitEachChild

func (node *NamedExports) VisitEachChild(v *NodeVisitor) *Node

type NamedImportBindings

type NamedImportBindings = Node // NamespaceImport | NamedImports

type NamedImports

type NamedImports struct {
	NodeBase
	Elements *ImportSpecifierList // NodeList[*ImportSpecifierNode]
}

func (*NamedImports) Clone

func (node *NamedImports) Clone(f *NodeFactory) *Node

func (*NamedImports) ForEachChild

func (node *NamedImports) ForEachChild(v Visitor) bool

func (*NamedImports) VisitEachChild

func (node *NamedImports) VisitEachChild(v *NodeVisitor) *Node

type NamedMember

type NamedMember = Node // Node with NamedMemberBase

type NamedMemberBase

type NamedMemberBase struct {
	DeclarationBase
	ModifiersBase

	PostfixToken *TokenNode // TokenNode. Optional
	// contains filtered or unexported fields
}

func (*NamedMemberBase) DeclarationData

func (node *NamedMemberBase) DeclarationData() *DeclarationBase

func (*NamedMemberBase) Modifiers

func (node *NamedMemberBase) Modifiers() *ModifierList

func (*NamedMemberBase) Name

func (node *NamedMemberBase) Name() *DeclarationName

type NamedTupleMember

type NamedTupleMember struct {
	TypeNodeBase
	DeclarationBase
	DotDotDotToken *TokenNode // TokenNode

	QuestionToken *TokenNode // TokenNode
	Type          *TypeNode  // TypeNode
	// contains filtered or unexported fields
}

func (*NamedTupleMember) Clone

func (node *NamedTupleMember) Clone(f *NodeFactory) *Node

func (*NamedTupleMember) ForEachChild

func (node *NamedTupleMember) ForEachChild(v Visitor) bool

func (*NamedTupleMember) Name

func (node *NamedTupleMember) Name() *DeclarationName

func (*NamedTupleMember) VisitEachChild

func (node *NamedTupleMember) VisitEachChild(v *NodeVisitor) *Node

type NamespaceExport

type NamespaceExport struct {
	NodeBase
	DeclarationBase
	// contains filtered or unexported fields
}

func (*NamespaceExport) Clone

func (node *NamespaceExport) Clone(f *NodeFactory) *Node

func (*NamespaceExport) ForEachChild

func (node *NamespaceExport) ForEachChild(v Visitor) bool

func (*NamespaceExport) Name

func (node *NamespaceExport) Name() *DeclarationName

func (*NamespaceExport) VisitEachChild

func (node *NamespaceExport) VisitEachChild(v *NodeVisitor) *Node

type NamespaceExportDeclaration

type NamespaceExportDeclaration struct {
	StatementBase
	DeclarationBase
	ModifiersBase
	// contains filtered or unexported fields
}

func (*NamespaceExportDeclaration) Clone

func (node *NamespaceExportDeclaration) Clone(f *NodeFactory) *Node

func (*NamespaceExportDeclaration) ForEachChild

func (node *NamespaceExportDeclaration) ForEachChild(v Visitor) bool

func (*NamespaceExportDeclaration) Name

func (*NamespaceExportDeclaration) VisitEachChild

func (node *NamespaceExportDeclaration) VisitEachChild(v *NodeVisitor) *Node

type NamespaceImport

type NamespaceImport struct {
	NodeBase
	DeclarationBase
	ExportableBase
	// contains filtered or unexported fields
}

func (*NamespaceImport) Clone

func (node *NamespaceImport) Clone(f *NodeFactory) *Node

func (*NamespaceImport) ForEachChild

func (node *NamespaceImport) ForEachChild(v Visitor) bool

func (*NamespaceImport) Name

func (node *NamespaceImport) Name() *DeclarationName

func (*NamespaceImport) VisitEachChild

func (node *NamespaceImport) VisitEachChild(v *NodeVisitor) *Node

type NewExpression

type NewExpression struct {
	ExpressionBase
	Expression    *Expression // Expression
	TypeArguments *NodeList   // NodeList[*TypeNode]. Optional
	Arguments     *NodeList   // NodeList[*Expression]. Optional
}

func (*NewExpression) Clone

func (node *NewExpression) Clone(f *NodeFactory) *Node

func (*NewExpression) ForEachChild

func (node *NewExpression) ForEachChild(v Visitor) bool

func (*NewExpression) VisitEachChild

func (node *NewExpression) VisitEachChild(v *NodeVisitor) *Node

type NoSubstitutionTemplateLiteral

type NoSubstitutionTemplateLiteral struct {
	ExpressionBase
	TemplateLiteralLikeBase
}

func (*NoSubstitutionTemplateLiteral) Clone

type Node

type Node struct {
	Kind  Kind
	Flags NodeFlags
	Loc   core.TextRange

	Parent *Node
	// contains filtered or unexported fields
}

func FindAncestor

func FindAncestor(node *Node, callback func(*Node) bool) *Node

Walks up the parents of a node to find the ancestor that matches the callback

func FindAncestorOrQuit

func FindAncestorOrQuit(node *Node, callback func(*Node) FindAncestorResult) *Node

Walks up the parents of a node to find the ancestor that matches the callback

func FindConstructorDeclaration

func FindConstructorDeclaration(node *ClassLikeDeclaration) *Node

func GetAssertedTypeNode

func GetAssertedTypeNode(node *Node) *Node

func GetAssignmentTarget

func GetAssignmentTarget(node *Node) *Node

Returns the BinaryExpression, PrefixUnaryExpression, PostfixUnaryExpression, or ForInOrOfStatement that references the given node as an assignment target

func GetContainingClass

func GetContainingClass(node *Node) *Node

func GetDeclarationContainer

func GetDeclarationContainer(node *Node) *Node

func GetDeclarationOfKind

func GetDeclarationOfKind(symbol *Symbol, kind Kind) *Node

func GetElementOrPropertyAccessArgumentExpressionOrName

func GetElementOrPropertyAccessArgumentExpressionOrName(node *Node) *Node

Does not handle signed numeric names like `a[+0]` - handling those would require handling prefix unary expressions throughout late binding handling as well, which is awkward (but ultimately probably doable if there is demand)

func GetEnclosingBlockScopeContainer

func GetEnclosingBlockScopeContainer(node *Node) *Node

func GetFirstIdentifier

func GetFirstIdentifier(node *Node) *Node

func GetImmediatelyInvokedFunctionExpression

func GetImmediatelyInvokedFunctionExpression(fn *Node) *Node

func GetImportAttributes

func GetImportAttributes(node *Node) *Node

func GetNameOfDeclaration

func GetNameOfDeclaration(declaration *Node) *Node

func GetNamespaceDeclarationNode

func GetNamespaceDeclarationNode(node *Node) *Node

func GetNewTargetContainer

func GetNewTargetContainer(node *Node) *Node

func GetNodeAtPosition

func GetNodeAtPosition(file *SourceFile, position int, isJavaScriptFile bool) *Node

Returns a token if position is in [start-of-leading-trivia, end), includes JSDoc only in JS files

func GetNonAssignedNameOfDeclaration

func GetNonAssignedNameOfDeclaration(declaration *Node) *Node

func GetRightMostAssignedExpression

func GetRightMostAssignedExpression(node *Node) *Node

func GetRootDeclaration

func GetRootDeclaration(node *Node) *Node

func GetThisContainer

func GetThisContainer(node *Node, includeArrowFunctions bool, includeClassComputedPropertyName bool) *Node

func NewFlowReduceLabelData

func NewFlowReduceLabelData(target *FlowLabel, antecedents *FlowList) *Node

func NewFlowSwitchClauseData

func NewFlowSwitchClauseData(switchStatement *Node, clauseStart int, clauseEnd int) *Node

func SkipTypeParentheses

func SkipTypeParentheses(node *Node) *Node

func WalkUpBindingElementsAndPatterns

func WalkUpBindingElementsAndPatterns(binding *Node) *Node

func WalkUpParenthesizedExpressions

func WalkUpParenthesizedExpressions(node *Expression) *Node

Walks up the parents of a parenthesized expression to find the containing node

func WalkUpParenthesizedTypes

func WalkUpParenthesizedTypes(node *TypeNode) *Node

Walks up the parents of a parenthesized type to find the containing node

func (*Node) ArgumentList

func (n *Node) ArgumentList() *NodeList

func (*Node) Arguments

func (n *Node) Arguments() []*Node

func (*Node) AsArrayLiteralExpression

func (n *Node) AsArrayLiteralExpression() *ArrayLiteralExpression

func (*Node) AsArrayTypeNode

func (n *Node) AsArrayTypeNode() *ArrayTypeNode

func (*Node) AsArrowFunction

func (n *Node) AsArrowFunction() *ArrowFunction

func (*Node) AsAsExpression

func (n *Node) AsAsExpression() *AsExpression

func (*Node) AsAwaitExpression

func (n *Node) AsAwaitExpression() *AwaitExpression

func (*Node) AsBigIntLiteral

func (n *Node) AsBigIntLiteral() *BigIntLiteral

func (*Node) AsBinaryExpression

func (n *Node) AsBinaryExpression() *BinaryExpression

func (*Node) AsBindingElement

func (n *Node) AsBindingElement() *BindingElement

func (*Node) AsBindingPattern

func (n *Node) AsBindingPattern() *BindingPattern

func (*Node) AsBlock

func (n *Node) AsBlock() *Block

func (*Node) AsBreakStatement

func (n *Node) AsBreakStatement() *BreakStatement

func (*Node) AsCallExpression

func (n *Node) AsCallExpression() *CallExpression

func (*Node) AsCallSignatureDeclaration

func (n *Node) AsCallSignatureDeclaration() *CallSignatureDeclaration

func (*Node) AsCaseBlock

func (n *Node) AsCaseBlock() *CaseBlock

func (*Node) AsCaseOrDefaultClause

func (n *Node) AsCaseOrDefaultClause() *CaseOrDefaultClause

func (*Node) AsCatchClause

func (n *Node) AsCatchClause() *CatchClause

func (*Node) AsClassDeclaration

func (n *Node) AsClassDeclaration() *ClassDeclaration

func (*Node) AsClassExpression

func (n *Node) AsClassExpression() *ClassExpression

func (*Node) AsClassStaticBlockDeclaration

func (n *Node) AsClassStaticBlockDeclaration() *ClassStaticBlockDeclaration

func (*Node) AsComputedPropertyName

func (n *Node) AsComputedPropertyName() *ComputedPropertyName

func (*Node) AsConditionalExpression

func (n *Node) AsConditionalExpression() *ConditionalExpression

func (*Node) AsConditionalTypeNode

func (n *Node) AsConditionalTypeNode() *ConditionalTypeNode

func (*Node) AsConstructSignatureDeclaration

func (n *Node) AsConstructSignatureDeclaration() *ConstructSignatureDeclaration

func (*Node) AsConstructorDeclaration

func (n *Node) AsConstructorDeclaration() *ConstructorDeclaration

func (*Node) AsConstructorTypeNode

func (n *Node) AsConstructorTypeNode() *ConstructorTypeNode

func (*Node) AsContinueStatement

func (n *Node) AsContinueStatement() *ContinueStatement

func (*Node) AsDebuggerStatement

func (n *Node) AsDebuggerStatement() *DebuggerStatement

func (*Node) AsDecorator

func (n *Node) AsDecorator() *Decorator

func (*Node) AsDeleteExpression

func (n *Node) AsDeleteExpression() *DeleteExpression

func (*Node) AsDoStatement

func (n *Node) AsDoStatement() *DoStatement

func (*Node) AsElementAccessExpression

func (n *Node) AsElementAccessExpression() *ElementAccessExpression

func (*Node) AsEmptyStatement

func (n *Node) AsEmptyStatement() *EmptyStatement

func (*Node) AsEnumDeclaration

func (n *Node) AsEnumDeclaration() *EnumDeclaration

func (*Node) AsEnumMember

func (n *Node) AsEnumMember() *EnumMember

func (*Node) AsExportAssignment

func (n *Node) AsExportAssignment() *ExportAssignment

func (*Node) AsExportDeclaration

func (n *Node) AsExportDeclaration() *ExportDeclaration

func (*Node) AsExportSpecifier

func (n *Node) AsExportSpecifier() *ExportSpecifier

func (*Node) AsExpressionStatement

func (n *Node) AsExpressionStatement() *ExpressionStatement

func (*Node) AsExpressionWithTypeArguments

func (n *Node) AsExpressionWithTypeArguments() *ExpressionWithTypeArguments

func (*Node) AsExternalModuleReference

func (n *Node) AsExternalModuleReference() *ExternalModuleReference

func (*Node) AsFlowReduceLabelData

func (n *Node) AsFlowReduceLabelData() *FlowReduceLabelData

func (*Node) AsFlowSwitchClauseData

func (n *Node) AsFlowSwitchClauseData() *FlowSwitchClauseData

func (*Node) AsForInOrOfStatement

func (n *Node) AsForInOrOfStatement() *ForInOrOfStatement

func (*Node) AsForStatement

func (n *Node) AsForStatement() *ForStatement

func (*Node) AsFunctionDeclaration

func (n *Node) AsFunctionDeclaration() *FunctionDeclaration

func (*Node) AsFunctionExpression

func (n *Node) AsFunctionExpression() *FunctionExpression

func (*Node) AsFunctionTypeNode

func (n *Node) AsFunctionTypeNode() *FunctionTypeNode

func (*Node) AsGetAccessorDeclaration

func (n *Node) AsGetAccessorDeclaration() *GetAccessorDeclaration

func (*Node) AsHeritageClause

func (n *Node) AsHeritageClause() *HeritageClause

func (*Node) AsIdentifier

func (n *Node) AsIdentifier() *Identifier

func (*Node) AsIfStatement

func (n *Node) AsIfStatement() *IfStatement

func (*Node) AsImportAttribute

func (n *Node) AsImportAttribute() *ImportAttribute

func (*Node) AsImportAttributes

func (n *Node) AsImportAttributes() *ImportAttributes

func (*Node) AsImportClause

func (n *Node) AsImportClause() *ImportClause

func (*Node) AsImportDeclaration

func (n *Node) AsImportDeclaration() *ImportDeclaration

func (*Node) AsImportEqualsDeclaration

func (n *Node) AsImportEqualsDeclaration() *ImportEqualsDeclaration

func (*Node) AsImportSpecifier

func (n *Node) AsImportSpecifier() *ImportSpecifier

func (*Node) AsImportTypeNode

func (n *Node) AsImportTypeNode() *ImportTypeNode

func (*Node) AsIndexSignatureDeclaration

func (n *Node) AsIndexSignatureDeclaration() *IndexSignatureDeclaration

func (*Node) AsIndexedAccessTypeNode

func (n *Node) AsIndexedAccessTypeNode() *IndexedAccessTypeNode

func (*Node) AsInferTypeNode

func (n *Node) AsInferTypeNode() *InferTypeNode

func (*Node) AsInterfaceDeclaration

func (n *Node) AsInterfaceDeclaration() *InterfaceDeclaration

func (*Node) AsIntersectionTypeNode

func (n *Node) AsIntersectionTypeNode() *IntersectionTypeNode

func (*Node) AsJSDoc

func (n *Node) AsJSDoc() *JSDoc

func (*Node) AsJSDocAllType

func (n *Node) AsJSDocAllType() *JSDocAllType

func (*Node) AsJSDocAugmentsTag

func (n *Node) AsJSDocAugmentsTag() *JSDocAugmentsTag

func (*Node) AsJSDocCallbackTag

func (n *Node) AsJSDocCallbackTag() *JSDocCallbackTag

func (*Node) AsJSDocCommentBase

func (n *Node) AsJSDocCommentBase() *JSDocCommentBase

func (*Node) AsJSDocDeprecatedTag

func (n *Node) AsJSDocDeprecatedTag() *JSDocDeprecatedTag

func (*Node) AsJSDocImplementsTag

func (n *Node) AsJSDocImplementsTag() *JSDocImplementsTag

func (*Node) AsJSDocImportTag

func (n *Node) AsJSDocImportTag() *JSDocImportTag
func (n *Node) AsJSDocLink() *JSDocLink

func (*Node) AsJSDocLinkCode

func (n *Node) AsJSDocLinkCode() *JSDocLinkCode

func (*Node) AsJSDocLinkPlain

func (n *Node) AsJSDocLinkPlain() *JSDocLinkPlain

func (*Node) AsJSDocNameReference

func (n *Node) AsJSDocNameReference() *JSDocNameReference

func (*Node) AsJSDocNonNullableType

func (n *Node) AsJSDocNonNullableType() *JSDocNonNullableType

func (*Node) AsJSDocNullableType

func (n *Node) AsJSDocNullableType() *JSDocNullableType

func (*Node) AsJSDocOptionalType

func (n *Node) AsJSDocOptionalType() *JSDocOptionalType

func (*Node) AsJSDocOverloadTag

func (n *Node) AsJSDocOverloadTag() *JSDocOverloadTag

func (*Node) AsJSDocOverrideTag

func (n *Node) AsJSDocOverrideTag() *JSDocOverrideTag

func (*Node) AsJSDocParameterTag

func (n *Node) AsJSDocParameterTag() *JSDocParameterTag

func (*Node) AsJSDocPrivateTag

func (n *Node) AsJSDocPrivateTag() *JSDocPrivateTag

func (*Node) AsJSDocPropertyTag

func (n *Node) AsJSDocPropertyTag() *JSDocPropertyTag

func (*Node) AsJSDocProtectedTag

func (n *Node) AsJSDocProtectedTag() *JSDocProtectedTag

func (*Node) AsJSDocPublicTag

func (n *Node) AsJSDocPublicTag() *JSDocPublicTag

func (*Node) AsJSDocReadonlyTag

func (n *Node) AsJSDocReadonlyTag() *JSDocReadonlyTag

func (*Node) AsJSDocReturnTag

func (n *Node) AsJSDocReturnTag() *JSDocReturnTag

func (*Node) AsJSDocSatisfiesTag

func (n *Node) AsJSDocSatisfiesTag() *JSDocSatisfiesTag

func (*Node) AsJSDocSeeTag

func (n *Node) AsJSDocSeeTag() *JSDocSeeTag

func (*Node) AsJSDocSignature

func (n *Node) AsJSDocSignature() *JSDocSignature

func (*Node) AsJSDocTagBase

func (n *Node) AsJSDocTagBase() *JSDocTagBase

func (*Node) AsJSDocTemplateTag

func (n *Node) AsJSDocTemplateTag() *JSDocTemplateTag

func (*Node) AsJSDocText

func (n *Node) AsJSDocText() *JSDocText

func (*Node) AsJSDocThisTag

func (n *Node) AsJSDocThisTag() *JSDocThisTag

func (*Node) AsJSDocTypeExpression

func (n *Node) AsJSDocTypeExpression() *JSDocTypeExpression

func (*Node) AsJSDocTypeLiteral

func (n *Node) AsJSDocTypeLiteral() *JSDocTypeLiteral

func (*Node) AsJSDocTypeTag

func (n *Node) AsJSDocTypeTag() *JSDocTypeTag

func (*Node) AsJSDocTypedefTag

func (n *Node) AsJSDocTypedefTag() *JSDocTypedefTag

func (*Node) AsJSDocUnknownTag

func (n *Node) AsJSDocUnknownTag() *JSDocUnknownTag

func (*Node) AsJSDocVariadicType

func (n *Node) AsJSDocVariadicType() *JSDocVariadicType

func (*Node) AsJsxAttribute

func (n *Node) AsJsxAttribute() *JsxAttribute

func (*Node) AsJsxAttributes

func (n *Node) AsJsxAttributes() *JsxAttributes

func (*Node) AsJsxClosingElement

func (n *Node) AsJsxClosingElement() *JsxClosingElement

func (*Node) AsJsxClosingFragment

func (n *Node) AsJsxClosingFragment() *JsxClosingFragment

func (*Node) AsJsxElement

func (n *Node) AsJsxElement() *JsxElement

func (*Node) AsJsxExpression

func (n *Node) AsJsxExpression() *JsxExpression

func (*Node) AsJsxFragment

func (n *Node) AsJsxFragment() *JsxFragment

func (*Node) AsJsxNamespacedName

func (n *Node) AsJsxNamespacedName() *JsxNamespacedName

func (*Node) AsJsxOpeningElement

func (n *Node) AsJsxOpeningElement() *JsxOpeningElement

func (*Node) AsJsxOpeningFragment

func (n *Node) AsJsxOpeningFragment() *JsxOpeningFragment

func (*Node) AsJsxSelfClosingElement

func (n *Node) AsJsxSelfClosingElement() *JsxSelfClosingElement

func (*Node) AsJsxSpreadAttribute

func (n *Node) AsJsxSpreadAttribute() *JsxSpreadAttribute

func (*Node) AsJsxText

func (n *Node) AsJsxText() *JsxText

func (*Node) AsKeywordExpression

func (n *Node) AsKeywordExpression() *KeywordExpression

func (*Node) AsKeywordTypeNode

func (n *Node) AsKeywordTypeNode() *KeywordTypeNode

func (*Node) AsLabeledStatement

func (n *Node) AsLabeledStatement() *LabeledStatement

func (*Node) AsLiteralTypeNode

func (n *Node) AsLiteralTypeNode() *LiteralTypeNode

func (*Node) AsMappedTypeNode

func (n *Node) AsMappedTypeNode() *MappedTypeNode

func (*Node) AsMetaProperty

func (n *Node) AsMetaProperty() *MetaProperty

func (*Node) AsMethodDeclaration

func (n *Node) AsMethodDeclaration() *MethodDeclaration

func (*Node) AsMethodSignatureDeclaration

func (n *Node) AsMethodSignatureDeclaration() *MethodSignatureDeclaration

func (*Node) AsMissingDeclaration

func (n *Node) AsMissingDeclaration() *MissingDeclaration

func (*Node) AsModuleBlock

func (n *Node) AsModuleBlock() *ModuleBlock

func (*Node) AsModuleDeclaration

func (n *Node) AsModuleDeclaration() *ModuleDeclaration

func (*Node) AsNamedExports

func (n *Node) AsNamedExports() *NamedExports

func (*Node) AsNamedImports

func (n *Node) AsNamedImports() *NamedImports

func (*Node) AsNamedTupleMember

func (n *Node) AsNamedTupleMember() *NamedTupleMember

func (*Node) AsNamespaceExport

func (n *Node) AsNamespaceExport() *NamespaceExport

func (*Node) AsNamespaceExportDeclaration

func (n *Node) AsNamespaceExportDeclaration() *NamespaceExportDeclaration

func (*Node) AsNamespaceImport

func (n *Node) AsNamespaceImport() *NamespaceImport

func (*Node) AsNewExpression

func (n *Node) AsNewExpression() *NewExpression

func (*Node) AsNoSubstitutionTemplateLiteral

func (n *Node) AsNoSubstitutionTemplateLiteral() *NoSubstitutionTemplateLiteral

func (*Node) AsNode

func (n *Node) AsNode() *Node

func (*Node) AsNonNullExpression

func (n *Node) AsNonNullExpression() *NonNullExpression

func (*Node) AsNumericLiteral

func (n *Node) AsNumericLiteral() *NumericLiteral

func (*Node) AsObjectLiteralExpression

func (n *Node) AsObjectLiteralExpression() *ObjectLiteralExpression

func (*Node) AsOptionalTypeNode

func (n *Node) AsOptionalTypeNode() *OptionalTypeNode

func (*Node) AsParameterDeclaration

func (n *Node) AsParameterDeclaration() *ParameterDeclaration

func (*Node) AsParenthesizedExpression

func (n *Node) AsParenthesizedExpression() *ParenthesizedExpression

func (*Node) AsParenthesizedTypeNode

func (n *Node) AsParenthesizedTypeNode() *ParenthesizedTypeNode

func (*Node) AsPartiallyEmittedExpression

func (n *Node) AsPartiallyEmittedExpression() *PartiallyEmittedExpression

func (*Node) AsPostfixUnaryExpression

func (n *Node) AsPostfixUnaryExpression() *PostfixUnaryExpression

func (*Node) AsPrefixUnaryExpression

func (n *Node) AsPrefixUnaryExpression() *PrefixUnaryExpression

func (*Node) AsPrivateIdentifier

func (n *Node) AsPrivateIdentifier() *PrivateIdentifier

func (*Node) AsPropertyAccessExpression

func (n *Node) AsPropertyAccessExpression() *PropertyAccessExpression

func (*Node) AsPropertyAssignment

func (n *Node) AsPropertyAssignment() *PropertyAssignment

func (*Node) AsPropertyDeclaration

func (n *Node) AsPropertyDeclaration() *PropertyDeclaration

func (*Node) AsPropertySignatureDeclaration

func (n *Node) AsPropertySignatureDeclaration() *PropertySignatureDeclaration

func (*Node) AsQualifiedName

func (n *Node) AsQualifiedName() *QualifiedName

func (*Node) AsRegularExpressionLiteral

func (n *Node) AsRegularExpressionLiteral() *RegularExpressionLiteral

func (*Node) AsRestTypeNode

func (n *Node) AsRestTypeNode() *RestTypeNode

func (*Node) AsReturnStatement

func (n *Node) AsReturnStatement() *ReturnStatement

func (*Node) AsSatisfiesExpression

func (n *Node) AsSatisfiesExpression() *SatisfiesExpression

func (*Node) AsSemicolonClassElement

func (n *Node) AsSemicolonClassElement() *SemicolonClassElement

func (*Node) AsSetAccessorDeclaration

func (n *Node) AsSetAccessorDeclaration() *SetAccessorDeclaration

func (*Node) AsShorthandPropertyAssignment

func (n *Node) AsShorthandPropertyAssignment() *ShorthandPropertyAssignment

func (*Node) AsSourceFile

func (n *Node) AsSourceFile() *SourceFile

func (*Node) AsSpreadAssignment

func (n *Node) AsSpreadAssignment() *SpreadAssignment

func (*Node) AsSpreadElement

func (n *Node) AsSpreadElement() *SpreadElement

func (*Node) AsStringLiteral

func (n *Node) AsStringLiteral() *StringLiteral

func (*Node) AsSwitchStatement

func (n *Node) AsSwitchStatement() *SwitchStatement

func (*Node) AsSyntaxList

func (n *Node) AsSyntaxList() *SyntaxList

func (*Node) AsSyntheticExpression

func (n *Node) AsSyntheticExpression() *SyntheticExpression

func (*Node) AsTaggedTemplateExpression

func (n *Node) AsTaggedTemplateExpression() *TaggedTemplateExpression

func (*Node) AsTemplateExpression

func (n *Node) AsTemplateExpression() *TemplateExpression

func (*Node) AsTemplateHead

func (n *Node) AsTemplateHead() *TemplateHead

func (*Node) AsTemplateLiteralTypeNode

func (n *Node) AsTemplateLiteralTypeNode() *TemplateLiteralTypeNode

func (*Node) AsTemplateLiteralTypeSpan

func (n *Node) AsTemplateLiteralTypeSpan() *TemplateLiteralTypeSpan

func (*Node) AsTemplateMiddle

func (n *Node) AsTemplateMiddle() *TemplateMiddle

func (*Node) AsTemplateSpan

func (n *Node) AsTemplateSpan() *TemplateSpan

func (*Node) AsTemplateTail

func (n *Node) AsTemplateTail() *TemplateTail

func (*Node) AsThisTypeNode

func (n *Node) AsThisTypeNode() *ThisTypeNode

func (*Node) AsThrowStatement

func (n *Node) AsThrowStatement() *ThrowStatement

func (*Node) AsTryStatement

func (n *Node) AsTryStatement() *TryStatement

func (*Node) AsTupleTypeNode

func (n *Node) AsTupleTypeNode() *TupleTypeNode

func (*Node) AsTypeAliasDeclaration

func (n *Node) AsTypeAliasDeclaration() *TypeAliasDeclaration

func (*Node) AsTypeAssertion

func (n *Node) AsTypeAssertion() *TypeAssertion

func (*Node) AsTypeLiteralNode

func (n *Node) AsTypeLiteralNode() *TypeLiteralNode

func (*Node) AsTypeOfExpression

func (n *Node) AsTypeOfExpression() *TypeOfExpression

func (*Node) AsTypeOperatorNode

func (n *Node) AsTypeOperatorNode() *TypeOperatorNode

func (*Node) AsTypeParameter

func (n *Node) AsTypeParameter() *TypeParameterDeclaration

func (*Node) AsTypePredicateNode

func (n *Node) AsTypePredicateNode() *TypePredicateNode

func (*Node) AsTypeQueryNode

func (n *Node) AsTypeQueryNode() *TypeQueryNode

func (*Node) AsTypeReference

func (n *Node) AsTypeReference() *TypeReferenceNode

func (*Node) AsTypeReferenceNode

func (n *Node) AsTypeReferenceNode() *TypeReferenceNode

func (*Node) AsUnionTypeNode

func (n *Node) AsUnionTypeNode() *UnionTypeNode

func (*Node) AsVariableDeclaration

func (n *Node) AsVariableDeclaration() *VariableDeclaration

func (*Node) AsVariableDeclarationList

func (n *Node) AsVariableDeclarationList() *VariableDeclarationList

func (*Node) AsVariableStatement

func (n *Node) AsVariableStatement() *VariableStatement

func (*Node) AsVoidExpression

func (n *Node) AsVoidExpression() *VoidExpression

func (*Node) AsWhileStatement

func (n *Node) AsWhileStatement() *WhileStatement

func (*Node) AsWithStatement

func (n *Node) AsWithStatement() *WithStatement

func (*Node) AsYieldExpression

func (n *Node) AsYieldExpression() *YieldExpression

func (*Node) Body

func (n *Node) Body() *Node

func (*Node) BodyData

func (n *Node) BodyData() *BodyBase

func (*Node) ClassLikeData

func (n *Node) ClassLikeData() *ClassLikeBase

func (*Node) Clone

func (n *Node) Clone(f *NodeFactory) *Node

func (*Node) CommentList

func (n *Node) CommentList() *NodeList

func (*Node) Comments

func (n *Node) Comments() []*Node

func (*Node) Contains

func (n *Node) Contains(descendant *Node) bool

Determines if `n` contains `descendant` by walking up the `Parent` pointers from `descendant`. This method panics if `descendant` or one of its ancestors is not parented except when that node is a `SourceFile`.

func (*Node) DeclarationData

func (n *Node) DeclarationData() *DeclarationBase

func (*Node) End

func (n *Node) End() int

func (*Node) ExportableData

func (n *Node) ExportableData() *ExportableBase

func (*Node) Expression

func (n *Node) Expression() *Node

func (*Node) FlowNodeData

func (n *Node) FlowNodeData() *FlowNodeBase

func (*Node) ForEachChild

func (n *Node) ForEachChild(v Visitor) bool

func (*Node) FunctionLikeData

func (n *Node) FunctionLikeData() *FunctionLikeBase

func (*Node) Initializer

func (n *Node) Initializer() *Node

func (*Node) IsTypeOnly

func (n *Node) IsTypeOnly() bool

func (*Node) JSDoc

func (node *Node) JSDoc(file *SourceFile) []*Node

if you provide nil for file, this code will walk to the root of the tree to find the file

func (*Node) Label

func (n *Node) Label() *Node

func (*Node) LiteralLikeData

func (n *Node) LiteralLikeData() *LiteralLikeBase

func (*Node) LocalSymbol

func (n *Node) LocalSymbol() *Symbol

func (*Node) Locals

func (n *Node) Locals() SymbolTable

func (*Node) LocalsContainerData

func (n *Node) LocalsContainerData() *LocalsContainerBase

func (*Node) MemberList

func (n *Node) MemberList() *NodeList

func (*Node) Members

func (n *Node) Members() []*Node

func (*Node) ModifierFlags

func (n *Node) ModifierFlags() ModifierFlags

func (*Node) ModifierNodes

func (n *Node) ModifierNodes() []*Node

func (*Node) Modifiers

func (n *Node) Modifiers() *ModifierList

func (*Node) Name

func (n *Node) Name() *DeclarationName

func (*Node) ParameterList

func (n *Node) ParameterList() *ParameterList

func (*Node) Parameters

func (n *Node) Parameters() []*ParameterDeclarationNode

func (*Node) Pos

func (n *Node) Pos() int

func (*Node) PropertyName

func (n *Node) PropertyName() *Node

func (*Node) PropertyNameOrName

func (n *Node) PropertyNameOrName() *Node

func (*Node) Symbol

func (n *Node) Symbol() *Symbol

func (*Node) TagName

func (n *Node) TagName() *Node

func (*Node) TemplateLiteralLikeData

func (n *Node) TemplateLiteralLikeData() *TemplateLiteralLikeBase

func (*Node) Text

func (n *Node) Text() string

func (*Node) Type

func (n *Node) Type() *Node

func (*Node) TypeArgumentList

func (n *Node) TypeArgumentList() *NodeList

func (*Node) TypeArguments

func (n *Node) TypeArguments() []*Node

func (*Node) TypeParameterList

func (n *Node) TypeParameterList() *NodeList

func (*Node) TypeParameters

func (n *Node) TypeParameters() []*Node

func (*Node) VisitEachChild

func (n *Node) VisitEachChild(v *NodeVisitor) *Node

type NodeBase

type NodeBase struct {
	NodeDefault
}

type NodeDefault

type NodeDefault struct {
	Node
}

func (*NodeDefault) AsNode

func (node *NodeDefault) AsNode() *Node

func (*NodeDefault) BodyData

func (node *NodeDefault) BodyData() *BodyBase

func (*NodeDefault) ClassLikeData

func (node *NodeDefault) ClassLikeData() *ClassLikeBase

func (*NodeDefault) Clone

func (node *NodeDefault) Clone(v *NodeFactory) *Node

func (*NodeDefault) DeclarationData

func (node *NodeDefault) DeclarationData() *DeclarationBase

func (*NodeDefault) ExportableData

func (node *NodeDefault) ExportableData() *ExportableBase

func (*NodeDefault) FlowNodeData

func (node *NodeDefault) FlowNodeData() *FlowNodeBase

func (*NodeDefault) ForEachChild

func (node *NodeDefault) ForEachChild(v Visitor) bool

func (*NodeDefault) FunctionLikeData

func (node *NodeDefault) FunctionLikeData() *FunctionLikeBase

func (*NodeDefault) LiteralLikeData

func (node *NodeDefault) LiteralLikeData() *LiteralLikeBase

func (*NodeDefault) LocalsContainerData

func (node *NodeDefault) LocalsContainerData() *LocalsContainerBase

func (*NodeDefault) Modifiers

func (node *NodeDefault) Modifiers() *ModifierList

func (*NodeDefault) Name

func (node *NodeDefault) Name() *DeclarationName

func (*NodeDefault) TemplateLiteralLikeData

func (node *NodeDefault) TemplateLiteralLikeData() *TemplateLiteralLikeBase

func (*NodeDefault) VisitEachChild

func (node *NodeDefault) VisitEachChild(v *NodeVisitor) *Node

type NodeFactory

type NodeFactory struct {
	// contains filtered or unexported fields
}

func NewNodeFactory

func NewNodeFactory(hooks NodeFactoryHooks) *NodeFactory

func (*NodeFactory) DeepCloneNode

func (f *NodeFactory) DeepCloneNode(node *Node) *Node

func (*NodeFactory) NewArrayLiteralExpression

func (f *NodeFactory) NewArrayLiteralExpression(elements *NodeList, multiLine bool) *Node

func (*NodeFactory) NewArrayTypeNode

func (f *NodeFactory) NewArrayTypeNode(elementType *TypeNode) *Node

func (*NodeFactory) NewArrowFunction

func (f *NodeFactory) NewArrowFunction(modifiers *ModifierList, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, equalsGreaterThanToken *TokenNode, body *BlockOrExpression) *Node

func (*NodeFactory) NewAsExpression

func (f *NodeFactory) NewAsExpression(expression *Expression, typeNode *TypeNode) *Node

func (*NodeFactory) NewAwaitExpression

func (f *NodeFactory) NewAwaitExpression(expression *Expression) *Node

func (*NodeFactory) NewBigIntLiteral

func (f *NodeFactory) NewBigIntLiteral(text string) *Node

func (*NodeFactory) NewBinaryExpression

func (f *NodeFactory) NewBinaryExpression(left *Expression, operatorToken *TokenNode, right *Expression) *Node

func (*NodeFactory) NewBindingElement

func (f *NodeFactory) NewBindingElement(dotDotDotToken *TokenNode, propertyName *PropertyName, name *BindingName, initializer *Expression) *Node

func (*NodeFactory) NewBindingPattern

func (f *NodeFactory) NewBindingPattern(kind Kind, elements *NodeList) *Node

func (*NodeFactory) NewBlock

func (f *NodeFactory) NewBlock(statements *NodeList, multiline bool) *Node

func (*NodeFactory) NewBreakStatement

func (f *NodeFactory) NewBreakStatement(label *IdentifierNode) *Node

func (*NodeFactory) NewCallExpression

func (f *NodeFactory) NewCallExpression(expression *Expression, questionDotToken *TokenNode, typeArguments *NodeList, arguments *NodeList, flags NodeFlags) *Node

func (*NodeFactory) NewCallSignatureDeclaration

func (f *NodeFactory) NewCallSignatureDeclaration(typeParameters *NodeList, parameters *NodeList, returnType *TypeNode) *Node

func (*NodeFactory) NewCaseBlock

func (f *NodeFactory) NewCaseBlock(clauses *NodeList) *Node

func (*NodeFactory) NewCaseOrDefaultClause

func (f *NodeFactory) NewCaseOrDefaultClause(kind Kind, expression *Expression, statements *NodeList) *Node

func (*NodeFactory) NewCatchClause

func (f *NodeFactory) NewCatchClause(variableDeclaration *VariableDeclarationNode, block *BlockNode) *Node

func (*NodeFactory) NewClassDeclaration

func (f *NodeFactory) NewClassDeclaration(modifiers *ModifierList, name *IdentifierNode, typeParameters *NodeList, heritageClauses *NodeList, members *NodeList) *Node

func (*NodeFactory) NewClassExpression

func (f *NodeFactory) NewClassExpression(modifiers *ModifierList, name *IdentifierNode, typeParameters *NodeList, heritageClauses *NodeList, members *NodeList) *Node

func (*NodeFactory) NewClassStaticBlockDeclaration

func (f *NodeFactory) NewClassStaticBlockDeclaration(modifiers *ModifierList, body *BlockNode) *Node

func (*NodeFactory) NewCommentRange

func (f *NodeFactory) NewCommentRange(kind Kind, pos int, end int, hasTrailingNewLine bool) CommentRange

func (*NodeFactory) NewComputedPropertyName

func (f *NodeFactory) NewComputedPropertyName(expression *Expression) *Node

func (*NodeFactory) NewConditionalExpression

func (f *NodeFactory) NewConditionalExpression(condition *Expression, questionToken *TokenNode, whenTrue *Expression, colonToken *TokenNode, whenFalse *Expression) *Node

func (*NodeFactory) NewConditionalTypeNode

func (f *NodeFactory) NewConditionalTypeNode(checkType *TypeNode, extendsType *TypeNode, trueType *TypeNode, falseType *TypeNode) *Node

func (*NodeFactory) NewConstructSignatureDeclaration

func (f *NodeFactory) NewConstructSignatureDeclaration(typeParameters *NodeList, parameters *NodeList, returnType *TypeNode) *Node

func (*NodeFactory) NewConstructorDeclaration

func (f *NodeFactory) NewConstructorDeclaration(modifiers *ModifierList, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewConstructorTypeNode

func (f *NodeFactory) NewConstructorTypeNode(modifiers *ModifierList, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode) *Node

func (*NodeFactory) NewContinueStatement

func (f *NodeFactory) NewContinueStatement(label *IdentifierNode) *Node

func (*NodeFactory) NewDebuggerStatement

func (f *NodeFactory) NewDebuggerStatement() *Node

func (*NodeFactory) NewDecorator

func (f *NodeFactory) NewDecorator(expression *LeftHandSideExpression) *Node

func (*NodeFactory) NewDeleteExpression

func (f *NodeFactory) NewDeleteExpression(expression *Expression) *Node

func (*NodeFactory) NewDoStatement

func (f *NodeFactory) NewDoStatement(statement *Statement, expression *Expression) *Node

func (*NodeFactory) NewElementAccessExpression

func (f *NodeFactory) NewElementAccessExpression(expression *Expression, questionDotToken *TokenNode, argumentExpression *Expression, flags NodeFlags) *Node

func (*NodeFactory) NewEmptyStatement

func (f *NodeFactory) NewEmptyStatement() *Node

func (*NodeFactory) NewEnumDeclaration

func (f *NodeFactory) NewEnumDeclaration(modifiers *ModifierList, name *IdentifierNode, members *NodeList) *Node

func (*NodeFactory) NewEnumMember

func (f *NodeFactory) NewEnumMember(name *PropertyName, initializer *Expression) *Node

func (*NodeFactory) NewExportAssignment

func (f *NodeFactory) NewExportAssignment(modifiers *ModifierList, isExportEquals bool, expression *Expression) *Node

func (*NodeFactory) NewExportDeclaration

func (f *NodeFactory) NewExportDeclaration(modifiers *ModifierList, isTypeOnly bool, exportClause *NamedExportBindings, moduleSpecifier *Expression, attributes *ImportAttributesNode) *Node

func (*NodeFactory) NewExportSpecifier

func (f *NodeFactory) NewExportSpecifier(isTypeOnly bool, propertyName *ModuleExportName, name *ModuleExportName) *Node

func (*NodeFactory) NewExpressionStatement

func (f *NodeFactory) NewExpressionStatement(expression *Expression) *Node

func (*NodeFactory) NewExpressionWithTypeArguments

func (f *NodeFactory) NewExpressionWithTypeArguments(expression *Expression, typeArguments *NodeList) *Node

func (*NodeFactory) NewExternalModuleReference

func (f *NodeFactory) NewExternalModuleReference(expression *Expression) *Node

func (*NodeFactory) NewForInOrOfStatement

func (f *NodeFactory) NewForInOrOfStatement(kind Kind, awaitModifier *TokenNode, initializer *ForInitializer, expression *Expression, statement *Statement) *Node

func (*NodeFactory) NewForStatement

func (f *NodeFactory) NewForStatement(initializer *ForInitializer, condition *Expression, incrementor *Expression, statement *Statement) *Node

func (*NodeFactory) NewFunctionDeclaration

func (f *NodeFactory) NewFunctionDeclaration(modifiers *ModifierList, asteriskToken *TokenNode, name *IdentifierNode, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewFunctionExpression

func (f *NodeFactory) NewFunctionExpression(modifiers *ModifierList, asteriskToken *TokenNode, name *IdentifierNode, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewFunctionTypeNode

func (f *NodeFactory) NewFunctionTypeNode(typeParameters *NodeList, parameters *NodeList, returnType *TypeNode) *Node

func (*NodeFactory) NewGetAccessorDeclaration

func (f *NodeFactory) NewGetAccessorDeclaration(modifiers *ModifierList, name *PropertyName, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewHeritageClause

func (f *NodeFactory) NewHeritageClause(token Kind, types *NodeList) *Node

func (*NodeFactory) NewIdentifier

func (f *NodeFactory) NewIdentifier(text string) *Node

func (*NodeFactory) NewIfStatement

func (f *NodeFactory) NewIfStatement(expression *Expression, thenStatement *Statement, elseStatement *Statement) *Node

func (*NodeFactory) NewImportAttribute

func (f *NodeFactory) NewImportAttribute(name *ImportAttributeName, value *Expression) *Node

func (*NodeFactory) NewImportAttributes

func (f *NodeFactory) NewImportAttributes(token Kind, attributes *NodeList, multiLine bool) *Node

func (*NodeFactory) NewImportClause

func (f *NodeFactory) NewImportClause(isTypeOnly bool, name *IdentifierNode, namedBindings *NamedImportBindings) *Node

func (*NodeFactory) NewImportDeclaration

func (f *NodeFactory) NewImportDeclaration(modifiers *ModifierList, importClause *ImportClauseNode, moduleSpecifier *Expression, attributes *ImportAttributesNode) *Node

func (*NodeFactory) NewImportEqualsDeclaration

func (f *NodeFactory) NewImportEqualsDeclaration(modifiers *ModifierList, isTypeOnly bool, name *IdentifierNode, moduleReference *ModuleReference) *Node

func (*NodeFactory) NewImportSpecifier

func (f *NodeFactory) NewImportSpecifier(isTypeOnly bool, propertyName *ModuleExportName, name *IdentifierNode) *Node

func (*NodeFactory) NewImportTypeNode

func (f *NodeFactory) NewImportTypeNode(isTypeOf bool, argument *TypeNode, attributes *ImportAttributesNode, qualifier *EntityName, typeArguments *NodeList) *Node

func (*NodeFactory) NewIndexSignatureDeclaration

func (f *NodeFactory) NewIndexSignatureDeclaration(modifiers *ModifierList, parameters *NodeList, returnType *TypeNode) *Node

func (*NodeFactory) NewIndexedAccessTypeNode

func (f *NodeFactory) NewIndexedAccessTypeNode(objectType *TypeNode, indexType *TypeNode) *Node

func (*NodeFactory) NewInferTypeNode

func (f *NodeFactory) NewInferTypeNode(typeParameter *TypeParameterDeclarationNode) *Node

func (*NodeFactory) NewInterfaceDeclaration

func (f *NodeFactory) NewInterfaceDeclaration(modifiers *ModifierList, name *IdentifierNode, typeParameters *NodeList, heritageClauses *NodeList, members *NodeList) *Node

func (*NodeFactory) NewIntersectionTypeNode

func (f *NodeFactory) NewIntersectionTypeNode(types *NodeList) *Node

func (*NodeFactory) NewJSDoc

func (f *NodeFactory) NewJSDoc(comment *NodeList, tags *NodeList) *Node

func (*NodeFactory) NewJSDocAllType

func (f *NodeFactory) NewJSDocAllType() *Node

func (*NodeFactory) NewJSDocAugmentsTag

func (f *NodeFactory) NewJSDocAugmentsTag(tagName *IdentifierNode, className *Expression, comment *NodeList) *Node

func (*NodeFactory) NewJSDocCallbackTag

func (f *NodeFactory) NewJSDocCallbackTag(tagName *IdentifierNode, typeExpression *TypeNode, fullName *Node, comment *NodeList) *Node

func (*NodeFactory) NewJSDocDeprecatedTag

func (f *NodeFactory) NewJSDocDeprecatedTag(tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocImplementsTag

func (f *NodeFactory) NewJSDocImplementsTag(tagName *IdentifierNode, className *Expression, comment *NodeList) *Node

func (*NodeFactory) NewJSDocImportTag

func (f *NodeFactory) NewJSDocImportTag(tagName *IdentifierNode, importClause *Declaration, moduleSpecifier *Node, attributes *Node, comment *NodeList) *Node
func (f *NodeFactory) NewJSDocLink(name *Node, text string) *Node

func (*NodeFactory) NewJSDocLinkCode

func (f *NodeFactory) NewJSDocLinkCode(name *Node, text string) *Node

func (*NodeFactory) NewJSDocLinkPlain

func (f *NodeFactory) NewJSDocLinkPlain(name *Node, text string) *Node

func (*NodeFactory) NewJSDocNameReference

func (f *NodeFactory) NewJSDocNameReference(name *EntityName) *Node

func (*NodeFactory) NewJSDocNonNullableType

func (f *NodeFactory) NewJSDocNonNullableType(typeNode *TypeNode) *Node

func (*NodeFactory) NewJSDocNullableType

func (f *NodeFactory) NewJSDocNullableType(typeNode *TypeNode) *Node

func (*NodeFactory) NewJSDocOptionalType

func (f *NodeFactory) NewJSDocOptionalType(typeNode *TypeNode) *Node

func (*NodeFactory) NewJSDocOverloadTag

func (f *NodeFactory) NewJSDocOverloadTag(tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocOverrideTag

func (f *NodeFactory) NewJSDocOverrideTag(tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocParameterTag

func (f *NodeFactory) NewJSDocParameterTag(tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node

func (*NodeFactory) NewJSDocPrivateTag

func (f *NodeFactory) NewJSDocPrivateTag(tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocPropertyTag

func (f *NodeFactory) NewJSDocPropertyTag(tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node

func (*NodeFactory) NewJSDocProtectedTag

func (f *NodeFactory) NewJSDocProtectedTag(tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocPublicTag

func (f *NodeFactory) NewJSDocPublicTag(tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocReadonlyTag

func (f *NodeFactory) NewJSDocReadonlyTag(tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocReturnTag

func (f *NodeFactory) NewJSDocReturnTag(tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocSatisfiesTag

func (f *NodeFactory) NewJSDocSatisfiesTag(tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocSeeTag

func (f *NodeFactory) NewJSDocSeeTag(tagName *IdentifierNode, nameExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocSignature

func (f *NodeFactory) NewJSDocSignature(typeParameters *TypeParameterList, parameters *NodeList, typeNode *JSDocTag) *Node

func (*NodeFactory) NewJSDocTemplateTag

func (f *NodeFactory) NewJSDocTemplateTag(tagName *IdentifierNode, constraint *Node, typeParameters *TypeParameterList, comment *NodeList) *Node

func (*NodeFactory) NewJSDocText

func (f *NodeFactory) NewJSDocText(text string) *Node

func (*NodeFactory) NewJSDocThisTag

func (f *NodeFactory) NewJSDocThisTag(tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocTypeExpression

func (f *NodeFactory) NewJSDocTypeExpression(typeNode *TypeNode) *Node

func (*NodeFactory) NewJSDocTypeLiteral

func (f *NodeFactory) NewJSDocTypeLiteral(jsDocPropertyTags []*Node, isArrayType bool) *Node

func (*NodeFactory) NewJSDocTypeTag

func (f *NodeFactory) NewJSDocTypeTag(tagName *IdentifierNode, typeExpression *Node, comment *NodeList) *Node

func (*NodeFactory) NewJSDocTypedefTag

func (f *NodeFactory) NewJSDocTypedefTag(tagName *IdentifierNode, typeExpression *Node, fullName *Node, comment *NodeList) *Node

func (*NodeFactory) NewJSDocUnknownTag

func (f *NodeFactory) NewJSDocUnknownTag(tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocVariadicType

func (f *NodeFactory) NewJSDocVariadicType(typeNode *TypeNode) *Node

func (*NodeFactory) NewJsxAttribute

func (f *NodeFactory) NewJsxAttribute(name *JsxAttributeName, initializer *JsxAttributeValue) *Node

func (*NodeFactory) NewJsxAttributes

func (f *NodeFactory) NewJsxAttributes(properties *NodeList) *Node

func (*NodeFactory) NewJsxClosingElement

func (f *NodeFactory) NewJsxClosingElement(tagName *JsxTagNameExpression) *Node

func (*NodeFactory) NewJsxClosingFragment

func (f *NodeFactory) NewJsxClosingFragment() *Node

func (*NodeFactory) NewJsxElement

func (f *NodeFactory) NewJsxElement(openingElement *JsxOpeningElementNode, children *NodeList, closingElement *JsxClosingElementNode) *Node

func (*NodeFactory) NewJsxExpression

func (f *NodeFactory) NewJsxExpression(dotDotDotToken *TokenNode, expression *Expression) *Node

func (*NodeFactory) NewJsxFragment

func (f *NodeFactory) NewJsxFragment(openingFragment *JsxOpeningFragmentNode, children *NodeList, closingFragment *JsxClosingFragmentNode) *Node

func (*NodeFactory) NewJsxNamespacedName

func (f *NodeFactory) NewJsxNamespacedName(namespace *IdentifierNode, name *IdentifierNode) *Node

func (*NodeFactory) NewJsxOpeningElement

func (f *NodeFactory) NewJsxOpeningElement(tagName *JsxTagNameExpression, typeArguments *NodeList, attributes *JsxAttributesNode) *Node

func (*NodeFactory) NewJsxOpeningFragment

func (f *NodeFactory) NewJsxOpeningFragment() *Node

func (*NodeFactory) NewJsxSelfClosingElement

func (f *NodeFactory) NewJsxSelfClosingElement(tagName *JsxTagNameExpression, typeArguments *NodeList, attributes *JsxAttributesNode) *Node

func (*NodeFactory) NewJsxSpreadAttribute

func (f *NodeFactory) NewJsxSpreadAttribute(expression *Expression) *Node

func (*NodeFactory) NewJsxText

func (f *NodeFactory) NewJsxText(text string, containsOnlyTriviaWhiteSpace bool) *Node

func (*NodeFactory) NewKeywordExpression

func (f *NodeFactory) NewKeywordExpression(kind Kind) *Node

func (*NodeFactory) NewKeywordTypeNode

func (f *NodeFactory) NewKeywordTypeNode(kind Kind) *Node

func (*NodeFactory) NewLabeledStatement

func (f *NodeFactory) NewLabeledStatement(label *IdentifierNode, statement *Statement) *Node

func (*NodeFactory) NewLiteralTypeNode

func (f *NodeFactory) NewLiteralTypeNode(literal *Node) *Node

func (*NodeFactory) NewMappedTypeNode

func (f *NodeFactory) NewMappedTypeNode(readonlyToken *TokenNode, typeParameter *TypeParameterDeclarationNode, nameType *TypeNode, questionToken *TokenNode, typeNode *TypeNode, members *NodeList) *Node

func (*NodeFactory) NewMetaProperty

func (f *NodeFactory) NewMetaProperty(keywordToken Kind, name *IdentifierNode) *Node

func (*NodeFactory) NewMethodDeclaration

func (f *NodeFactory) NewMethodDeclaration(modifiers *ModifierList, asteriskToken *TokenNode, name *PropertyName, postfixToken *TokenNode, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewMethodSignatureDeclaration

func (f *NodeFactory) NewMethodSignatureDeclaration(modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode) *Node

func (*NodeFactory) NewMissingDeclaration

func (f *NodeFactory) NewMissingDeclaration(modifiers *ModifierList) *Node

func (*NodeFactory) NewModifier

func (f *NodeFactory) NewModifier(kind Kind) *Node

func (*NodeFactory) NewModifierList

func (f *NodeFactory) NewModifierList(nodes []*Node) *ModifierList

func (*NodeFactory) NewModuleBlock

func (f *NodeFactory) NewModuleBlock(statements *NodeList) *Node

func (*NodeFactory) NewModuleDeclaration

func (f *NodeFactory) NewModuleDeclaration(modifiers *ModifierList, name *ModuleName, body *ModuleBody, flags NodeFlags) *Node

func (*NodeFactory) NewNamedExports

func (f *NodeFactory) NewNamedExports(elements *NodeList) *Node

func (*NodeFactory) NewNamedImports

func (f *NodeFactory) NewNamedImports(elements *ImportSpecifierList) *Node

func (*NodeFactory) NewNamedTupleMember

func (f *NodeFactory) NewNamedTupleMember(dotDotDotToken *TokenNode, name *IdentifierNode, questionToken *TokenNode, typeNode *TypeNode) *Node

func (*NodeFactory) NewNamespaceExport

func (f *NodeFactory) NewNamespaceExport(name *ModuleExportName) *Node

func (*NodeFactory) NewNamespaceExportDeclaration

func (f *NodeFactory) NewNamespaceExportDeclaration(modifiers *ModifierList, name *IdentifierNode) *Node

func (*NodeFactory) NewNamespaceImport

func (f *NodeFactory) NewNamespaceImport(name *IdentifierNode) *Node

func (*NodeFactory) NewNewExpression

func (f *NodeFactory) NewNewExpression(expression *Expression, typeArguments *NodeList, arguments *NodeList) *Node

func (*NodeFactory) NewNoSubstitutionTemplateLiteral

func (f *NodeFactory) NewNoSubstitutionTemplateLiteral(text string) *Node

func (*NodeFactory) NewNodeList

func (f *NodeFactory) NewNodeList(nodes []*Node) *NodeList

func (*NodeFactory) NewNonNullExpression

func (f *NodeFactory) NewNonNullExpression(expression *Expression, flags NodeFlags) *Node

func (*NodeFactory) NewNumericLiteral

func (f *NodeFactory) NewNumericLiteral(text string) *Node

func (*NodeFactory) NewObjectLiteralExpression

func (f *NodeFactory) NewObjectLiteralExpression(properties *NodeList, multiLine bool) *Node

func (*NodeFactory) NewOmittedExpression

func (f *NodeFactory) NewOmittedExpression() *Node

func (*NodeFactory) NewOptionalTypeNode

func (f *NodeFactory) NewOptionalTypeNode(typeNode *TypeNode) *Node

func (*NodeFactory) NewParameterDeclaration

func (f *NodeFactory) NewParameterDeclaration(modifiers *ModifierList, dotDotDotToken *TokenNode, name *BindingName, questionToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) NewParenthesizedExpression

func (f *NodeFactory) NewParenthesizedExpression(expression *Expression) *Node

func (*NodeFactory) NewParenthesizedTypeNode

func (f *NodeFactory) NewParenthesizedTypeNode(typeNode *TypeNode) *Node

func (*NodeFactory) NewPartiallyEmittedExpression

func (f *NodeFactory) NewPartiallyEmittedExpression(expression *Expression) *Node

func (*NodeFactory) NewPostfixUnaryExpression

func (f *NodeFactory) NewPostfixUnaryExpression(operand *Expression, operator Kind) *Node

func (*NodeFactory) NewPrefixUnaryExpression

func (f *NodeFactory) NewPrefixUnaryExpression(operator Kind, operand *Expression) *Node

func (*NodeFactory) NewPrivateIdentifier

func (f *NodeFactory) NewPrivateIdentifier(text string) *Node

func (*NodeFactory) NewPropertyAccessExpression

func (f *NodeFactory) NewPropertyAccessExpression(expression *Expression, questionDotToken *TokenNode, name *MemberName, flags NodeFlags) *Node

func (*NodeFactory) NewPropertyAssignment

func (f *NodeFactory) NewPropertyAssignment(modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, initializer *Expression) *Node

func (*NodeFactory) NewPropertyDeclaration

func (f *NodeFactory) NewPropertyDeclaration(modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) NewPropertySignatureDeclaration

func (f *NodeFactory) NewPropertySignatureDeclaration(modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) NewQualifiedName

func (f *NodeFactory) NewQualifiedName(left *EntityName, right *IdentifierNode) *Node

func (*NodeFactory) NewRegularExpressionLiteral

func (f *NodeFactory) NewRegularExpressionLiteral(text string) *Node

func (*NodeFactory) NewRestTypeNode

func (f *NodeFactory) NewRestTypeNode(typeNode *TypeNode) *Node

func (*NodeFactory) NewReturnStatement

func (f *NodeFactory) NewReturnStatement(expression *Expression) *Node

func (*NodeFactory) NewSatisfiesExpression

func (f *NodeFactory) NewSatisfiesExpression(expression *Expression, typeNode *TypeNode) *Node

func (*NodeFactory) NewSemicolonClassElement

func (f *NodeFactory) NewSemicolonClassElement() *Node

func (*NodeFactory) NewSetAccessorDeclaration

func (f *NodeFactory) NewSetAccessorDeclaration(modifiers *ModifierList, name *PropertyName, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewShorthandPropertyAssignment

func (f *NodeFactory) NewShorthandPropertyAssignment(modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, equalsToken *TokenNode, objectAssignmentInitializer *Expression) *Node

func (*NodeFactory) NewSourceFile

func (f *NodeFactory) NewSourceFile(text string, fileName string, path tspath.Path, statements *NodeList) *Node

func (*NodeFactory) NewSpreadAssignment

func (f *NodeFactory) NewSpreadAssignment(expression *Expression) *Node

func (*NodeFactory) NewSpreadElement

func (f *NodeFactory) NewSpreadElement(expression *Expression) *Node

func (*NodeFactory) NewStringLiteral

func (f *NodeFactory) NewStringLiteral(text string) *Node

func (*NodeFactory) NewSwitchStatement

func (f *NodeFactory) NewSwitchStatement(expression *Expression, caseBlock *CaseBlockNode) *Node

func (*NodeFactory) NewSyntaxList

func (f *NodeFactory) NewSyntaxList(children []*Node) *Node

func (*NodeFactory) NewSyntheticExpression

func (f *NodeFactory) NewSyntheticExpression(t any, isSpread bool, tupleNameSource *Node) *Node

func (*NodeFactory) NewTaggedTemplateExpression

func (f *NodeFactory) NewTaggedTemplateExpression(tag *Expression, questionDotToken *TokenNode, typeArguments *NodeList, template *TemplateLiteral, flags NodeFlags) *Node

func (*NodeFactory) NewTemplateExpression

func (f *NodeFactory) NewTemplateExpression(head *TemplateHeadNode, templateSpans *NodeList) *Node

func (*NodeFactory) NewTemplateHead

func (f *NodeFactory) NewTemplateHead(text string, rawText string, templateFlags TokenFlags) *Node

func (*NodeFactory) NewTemplateLiteralTypeNode

func (f *NodeFactory) NewTemplateLiteralTypeNode(head *TemplateHeadNode, templateSpans *NodeList) *Node

func (*NodeFactory) NewTemplateLiteralTypeSpan

func (f *NodeFactory) NewTemplateLiteralTypeSpan(typeNode *TypeNode, literal *TemplateMiddleOrTail) *Node

func (*NodeFactory) NewTemplateMiddle

func (f *NodeFactory) NewTemplateMiddle(text string, rawText string, templateFlags TokenFlags) *Node

func (*NodeFactory) NewTemplateSpan

func (f *NodeFactory) NewTemplateSpan(expression *Expression, literal *TemplateMiddleOrTail) *Node

func (*NodeFactory) NewTemplateTail

func (f *NodeFactory) NewTemplateTail(text string, rawText string, templateFlags TokenFlags) *Node

func (*NodeFactory) NewThisTypeNode

func (f *NodeFactory) NewThisTypeNode() *Node

func (*NodeFactory) NewThrowStatement

func (f *NodeFactory) NewThrowStatement(expression *Expression) *Node

func (*NodeFactory) NewToken

func (f *NodeFactory) NewToken(kind Kind) *Node

func (*NodeFactory) NewTryStatement

func (f *NodeFactory) NewTryStatement(tryBlock *BlockNode, catchClause *CatchClauseNode, finallyBlock *BlockNode) *Node

func (*NodeFactory) NewTupleTypeNode

func (f *NodeFactory) NewTupleTypeNode(elements *NodeList) *Node

func (*NodeFactory) NewTypeAliasDeclaration

func (f *NodeFactory) NewTypeAliasDeclaration(modifiers *ModifierList, name *IdentifierNode, typeParameters *NodeList, typeNode *TypeNode) *Node

func (*NodeFactory) NewTypeAssertion

func (f *NodeFactory) NewTypeAssertion(typeNode *TypeNode, expression *Expression) *Node

func (*NodeFactory) NewTypeLiteralNode

func (f *NodeFactory) NewTypeLiteralNode(members *NodeList) *Node

func (*NodeFactory) NewTypeOfExpression

func (f *NodeFactory) NewTypeOfExpression(expression *Expression) *Node

func (*NodeFactory) NewTypeOperatorNode

func (f *NodeFactory) NewTypeOperatorNode(operator Kind, typeNode *TypeNode) *Node

func (*NodeFactory) NewTypeParameterDeclaration

func (f *NodeFactory) NewTypeParameterDeclaration(modifiers *ModifierList, name *IdentifierNode, constraint *TypeNode, defaultType *TypeNode) *Node

func (*NodeFactory) NewTypePredicateNode

func (f *NodeFactory) NewTypePredicateNode(assertsModifier *TokenNode, parameterName *TypePredicateParameterName, typeNode *TypeNode) *Node

func (*NodeFactory) NewTypeQueryNode

func (f *NodeFactory) NewTypeQueryNode(exprName *EntityName, typeArguments *NodeList) *Node

func (*NodeFactory) NewTypeReferenceNode

func (f *NodeFactory) NewTypeReferenceNode(typeName *EntityName, typeArguments *NodeList) *Node

func (*NodeFactory) NewUnionTypeNode

func (f *NodeFactory) NewUnionTypeNode(types *NodeList) *Node

func (*NodeFactory) NewVariableDeclaration

func (f *NodeFactory) NewVariableDeclaration(name *BindingName, exclamationToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) NewVariableDeclarationList

func (f *NodeFactory) NewVariableDeclarationList(flags NodeFlags, declarations *NodeList) *Node

func (*NodeFactory) NewVariableStatement

func (f *NodeFactory) NewVariableStatement(modifiers *ModifierList, declarationList *VariableDeclarationListNode) *Node

func (*NodeFactory) NewVoidExpression

func (f *NodeFactory) NewVoidExpression(expression *Expression) *Node

func (*NodeFactory) NewWhileStatement

func (f *NodeFactory) NewWhileStatement(expression *Expression, statement *Statement) *Node

func (*NodeFactory) NewWithStatement

func (f *NodeFactory) NewWithStatement(expression *Expression, statement *Statement) *Node

func (*NodeFactory) NewYieldExpression

func (f *NodeFactory) NewYieldExpression(asteriskToken *TokenNode, expression *Expression) *Node

func (*NodeFactory) UpdateArrayLiteralExpression

func (f *NodeFactory) UpdateArrayLiteralExpression(node *ArrayLiteralExpression, elements *ElementList) *Node

func (*NodeFactory) UpdateArrayTypeNode

func (f *NodeFactory) UpdateArrayTypeNode(node *ArrayTypeNode, elementType *TypeNode) *Node

func (*NodeFactory) UpdateArrowFunction

func (f *NodeFactory) UpdateArrowFunction(node *ArrowFunction, modifiers *ModifierList, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode, equalsGreaterThanToken *TokenNode, body *BlockOrExpression) *Node

func (*NodeFactory) UpdateAsExpression

func (f *NodeFactory) UpdateAsExpression(node *AsExpression, expression *Expression, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateAwaitExpression

func (f *NodeFactory) UpdateAwaitExpression(node *AwaitExpression, expression *Expression) *Node

func (*NodeFactory) UpdateBinaryExpression

func (f *NodeFactory) UpdateBinaryExpression(node *BinaryExpression, left *Expression, operatorToken *TokenNode, right *Expression) *Node

func (*NodeFactory) UpdateBindingElement

func (f *NodeFactory) UpdateBindingElement(node *BindingElement, dotDotDotToken *TokenNode, propertyName *PropertyName, name *BindingName, initializer *Expression) *Node

func (*NodeFactory) UpdateBindingPattern

func (f *NodeFactory) UpdateBindingPattern(node *BindingPattern, elements *BindingElementList) *Node

func (*NodeFactory) UpdateBlock

func (f *NodeFactory) UpdateBlock(node *Block, statements *StatementList) *Node

func (*NodeFactory) UpdateBreakStatement

func (f *NodeFactory) UpdateBreakStatement(node *BreakStatement, label *IdentifierNode) *Node

func (*NodeFactory) UpdateCallExpression

func (f *NodeFactory) UpdateCallExpression(node *CallExpression, expression *Expression, questionDotToken *TokenNode, typeArguments *TypeArgumentList, arguments *ArgumentList) *Node

func (*NodeFactory) UpdateCallSignatureDeclaration

func (f *NodeFactory) UpdateCallSignatureDeclaration(node *CallSignatureDeclaration, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode) *Node

func (*NodeFactory) UpdateCaseBlock

func (f *NodeFactory) UpdateCaseBlock(node *CaseBlock, clauses *CaseClausesList) *Node

func (*NodeFactory) UpdateCaseOrDefaultClause

func (f *NodeFactory) UpdateCaseOrDefaultClause(node *CaseOrDefaultClause, expression *Expression, statements *StatementList) *Node

func (*NodeFactory) UpdateCatchClause

func (f *NodeFactory) UpdateCatchClause(node *CatchClause, variableDeclaration *VariableDeclarationNode, block *BlockNode) *Node

func (*NodeFactory) UpdateClassDeclaration

func (f *NodeFactory) UpdateClassDeclaration(node *ClassDeclaration, modifiers *ModifierList, name *IdentifierNode, typeParameters *TypeParameterList, heritageClauses *HeritageClauseList, members *ClassElementList) *Node

func (*NodeFactory) UpdateClassExpression

func (f *NodeFactory) UpdateClassExpression(node *ClassExpression, modifiers *ModifierList, name *IdentifierNode, typeParameters *TypeParameterList, heritageClauses *HeritageClauseList, members *ClassElementList) *Node

func (*NodeFactory) UpdateClassStaticBlockDeclaration

func (f *NodeFactory) UpdateClassStaticBlockDeclaration(node *ClassStaticBlockDeclaration, modifiers *ModifierList, body *BlockNode) *Node

func (*NodeFactory) UpdateComputedPropertyName

func (f *NodeFactory) UpdateComputedPropertyName(node *ComputedPropertyName, expression *Expression) *Node

func (*NodeFactory) UpdateConditionalExpression

func (f *NodeFactory) UpdateConditionalExpression(node *ConditionalExpression, condition *Expression, questionToken *TokenNode, whenTrue *Expression, colonToken *TokenNode, whenFalse *Expression) *Node

func (*NodeFactory) UpdateConditionalTypeNode

func (f *NodeFactory) UpdateConditionalTypeNode(node *ConditionalTypeNode, checkType *TypeNode, extendsType *TypeNode, trueType *TypeNode, falseType *TypeNode) *Node

func (*NodeFactory) UpdateConstructSignatureDeclaration

func (f *NodeFactory) UpdateConstructSignatureDeclaration(node *ConstructSignatureDeclaration, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode) *Node

func (*NodeFactory) UpdateConstructorDeclaration

func (f *NodeFactory) UpdateConstructorDeclaration(node *ConstructorDeclaration, modifiers *ModifierList, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) UpdateConstructorTypeNode

func (f *NodeFactory) UpdateConstructorTypeNode(node *ConstructorTypeNode, modifiers *ModifierList, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode) *Node

func (*NodeFactory) UpdateContinueStatement

func (f *NodeFactory) UpdateContinueStatement(node *ContinueStatement, label *IdentifierNode) *Node

func (*NodeFactory) UpdateDecorator

func (f *NodeFactory) UpdateDecorator(node *Decorator, expression *Expression) *Node

func (*NodeFactory) UpdateDeleteExpression

func (f *NodeFactory) UpdateDeleteExpression(node *DeleteExpression, expression *Expression) *Node

func (*NodeFactory) UpdateDoStatement

func (f *NodeFactory) UpdateDoStatement(node *DoStatement, statement *Statement, expression *Expression) *Node

func (*NodeFactory) UpdateElementAccessExpression

func (f *NodeFactory) UpdateElementAccessExpression(node *ElementAccessExpression, expression *Expression, questionDotToken *TokenNode, argumentExpression *Expression) *Node

func (*NodeFactory) UpdateEnumDeclaration

func (f *NodeFactory) UpdateEnumDeclaration(node *EnumDeclaration, modifiers *ModifierList, name *IdentifierNode, members *EnumMemberList) *Node

func (*NodeFactory) UpdateEnumMember

func (f *NodeFactory) UpdateEnumMember(node *EnumMember, name *PropertyName, initializer *Expression) *Node

func (*NodeFactory) UpdateExportAssignment

func (f *NodeFactory) UpdateExportAssignment(node *ExportAssignment, modifiers *ModifierList, expression *Expression) *Node

func (*NodeFactory) UpdateExportDeclaration

func (f *NodeFactory) UpdateExportDeclaration(node *ExportDeclaration, modifiers *ModifierList, isTypeOnly bool, exportClause *NamedExportBindings, moduleSpecifier *Expression, attributes *ImportAttributesNode) *Node

func (*NodeFactory) UpdateExportSpecifier

func (f *NodeFactory) UpdateExportSpecifier(node *ExportSpecifier, isTypeOnly bool, propertyName *ModuleExportName, name *ModuleExportName) *Node

func (*NodeFactory) UpdateExpressionStatement

func (f *NodeFactory) UpdateExpressionStatement(node *ExpressionStatement, expression *Expression) *Node

func (*NodeFactory) UpdateExpressionWithTypeArguments

func (f *NodeFactory) UpdateExpressionWithTypeArguments(node *ExpressionWithTypeArguments, expression *Expression, typeArguments *TypeArgumentList) *Node

func (*NodeFactory) UpdateExternalModuleReference

func (f *NodeFactory) UpdateExternalModuleReference(node *ExternalModuleReference, expression *Expression) *Node

func (*NodeFactory) UpdateForInOrOfStatement

func (f *NodeFactory) UpdateForInOrOfStatement(node *ForInOrOfStatement, awaitModifier *TokenNode, initializer *ForInitializer, expression *Expression, statement *Statement) *Node

func (*NodeFactory) UpdateForStatement

func (f *NodeFactory) UpdateForStatement(node *ForStatement, initializer *ForInitializer, condition *Expression, incrementor *Expression, statement *Statement) *Node

func (*NodeFactory) UpdateFunctionDeclaration

func (f *NodeFactory) UpdateFunctionDeclaration(node *FunctionDeclaration, modifiers *ModifierList, asteriskToken *TokenNode, name *IdentifierNode, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) UpdateFunctionExpression

func (f *NodeFactory) UpdateFunctionExpression(node *FunctionExpression, modifiers *ModifierList, asteriskToken *TokenNode, name *IdentifierNode, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) UpdateFunctionTypeNode

func (f *NodeFactory) UpdateFunctionTypeNode(node *FunctionTypeNode, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode) *Node

func (*NodeFactory) UpdateGetAccessorDeclaration

func (f *NodeFactory) UpdateGetAccessorDeclaration(node *GetAccessorDeclaration, modifiers *ModifierList, name *PropertyName, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) UpdateHeritageClause

func (f *NodeFactory) UpdateHeritageClause(node *HeritageClause, types *ExpressionWithTypeArgumentsList) *Node

func (*NodeFactory) UpdateIfStatement

func (f *NodeFactory) UpdateIfStatement(node *IfStatement, expression *Expression, thenStatement *Statement, elseStatement *Statement) *Node

func (*NodeFactory) UpdateImportAttribute

func (f *NodeFactory) UpdateImportAttribute(node *ImportAttribute, name *ImportAttributeName, value *Expression) *Node

func (*NodeFactory) UpdateImportAttributes

func (f *NodeFactory) UpdateImportAttributes(node *ImportAttributes, attributes *ImportAttributeList) *Node

func (*NodeFactory) UpdateImportClause

func (f *NodeFactory) UpdateImportClause(node *ImportClause, isTypeOnly bool, name *IdentifierNode, namedBindings *NamedImportBindings) *Node

func (*NodeFactory) UpdateImportDeclaration

func (f *NodeFactory) UpdateImportDeclaration(node *ImportDeclaration, modifiers *ModifierList, importClause *ImportClauseNode, moduleSpecifier *Expression, attributes *ImportAttributesNode) *Node

func (*NodeFactory) UpdateImportEqualsDeclaration

func (f *NodeFactory) UpdateImportEqualsDeclaration(node *ImportEqualsDeclaration, modifiers *ModifierList, isTypeOnly bool, name *IdentifierNode, moduleReference *ModuleReference) *Node

func (*NodeFactory) UpdateImportSpecifier

func (f *NodeFactory) UpdateImportSpecifier(node *ImportSpecifier, isTypeOnly bool, propertyName *ModuleExportName, name *IdentifierNode) *Node

func (*NodeFactory) UpdateImportTypeNode

func (f *NodeFactory) UpdateImportTypeNode(node *ImportTypeNode, isTypeOf bool, argument *TypeNode, attributes *ImportAttributesNode, qualifier *EntityName, typeArguments *TypeArgumentList) *Node

func (*NodeFactory) UpdateIndexSignatureDeclaration

func (f *NodeFactory) UpdateIndexSignatureDeclaration(node *IndexSignatureDeclaration, modifiers *ModifierList, parameters *ParameterList, returnType *TypeNode) *Node

func (*NodeFactory) UpdateIndexedAccessTypeNode

func (f *NodeFactory) UpdateIndexedAccessTypeNode(node *IndexedAccessTypeNode, objectType *TypeNode, indexType *TypeNode) *Node

func (*NodeFactory) UpdateInferTypeNode

func (f *NodeFactory) UpdateInferTypeNode(node *InferTypeNode, typeParameter *TypeNode) *Node

func (*NodeFactory) UpdateInterfaceDeclaration

func (f *NodeFactory) UpdateInterfaceDeclaration(node *InterfaceDeclaration, modifiers *ModifierList, name *IdentifierNode, typeParameters *TypeParameterList, heritageClauses *HeritageClauseList, members *TypeElementList) *Node

func (*NodeFactory) UpdateIntersectionTypeNode

func (f *NodeFactory) UpdateIntersectionTypeNode(node *IntersectionTypeNode, types *TypeList) *Node

func (*NodeFactory) UpdateJSDoc

func (f *NodeFactory) UpdateJSDoc(node *JSDoc, comment *NodeList, tags *NodeList) *Node

func (*NodeFactory) UpdateJSDocAugmentsTag

func (f *NodeFactory) UpdateJSDocAugmentsTag(node *JSDocAugmentsTag, tagName *IdentifierNode, className *Expression, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocCallbackTag

func (f *NodeFactory) UpdateJSDocCallbackTag(node *JSDocCallbackTag, tagName *IdentifierNode, typeExpression *TypeNode, fullName *Node, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocDeprecatedTag

func (f *NodeFactory) UpdateJSDocDeprecatedTag(node *JSDocDeprecatedTag, tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocImplementsTag

func (f *NodeFactory) UpdateJSDocImplementsTag(node *JSDocImplementsTag, tagName *IdentifierNode, className *Expression, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocImportTag

func (f *NodeFactory) UpdateJSDocImportTag(node *JSDocImportTag, tagName *IdentifierNode, importClause *Declaration, moduleSpecifier *Node, attributes *Node, comment *NodeList) *Node
func (f *NodeFactory) UpdateJSDocLink(node *JSDocLink, name *Node, text string) *Node

func (*NodeFactory) UpdateJSDocLinkCode

func (f *NodeFactory) UpdateJSDocLinkCode(node *JSDocLinkCode, name *Node, text string) *Node

func (*NodeFactory) UpdateJSDocLinkPlain

func (f *NodeFactory) UpdateJSDocLinkPlain(node *JSDocLinkPlain, name *Node, text string) *Node

func (*NodeFactory) UpdateJSDocNameReference

func (f *NodeFactory) UpdateJSDocNameReference(node *JSDocNameReference, name *EntityName) *Node

func (*NodeFactory) UpdateJSDocNonNullableType

func (f *NodeFactory) UpdateJSDocNonNullableType(node *JSDocNonNullableType, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateJSDocNullableType

func (f *NodeFactory) UpdateJSDocNullableType(node *JSDocNullableType, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateJSDocOptionalType

func (f *NodeFactory) UpdateJSDocOptionalType(node *JSDocOptionalType, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateJSDocOverloadTag

func (f *NodeFactory) UpdateJSDocOverloadTag(node *JSDocOverloadTag, tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocOverrideTag

func (f *NodeFactory) UpdateJSDocOverrideTag(node *JSDocOverrideTag, tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocParameterTag

func (f *NodeFactory) UpdateJSDocParameterTag(node *JSDocParameterTag, tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocPrivateTag

func (f *NodeFactory) UpdateJSDocPrivateTag(node *JSDocPrivateTag, tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocPropertyTag

func (f *NodeFactory) UpdateJSDocPropertyTag(node *JSDocPropertyTag, tagName *IdentifierNode, name *EntityName, isBracketed bool, typeExpression *TypeNode, isNameFirst bool, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocProtectedTag

func (f *NodeFactory) UpdateJSDocProtectedTag(node *JSDocProtectedTag, tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocPublicTag

func (f *NodeFactory) UpdateJSDocPublicTag(node *JSDocPublicTag, tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocReadonlyTag

func (f *NodeFactory) UpdateJSDocReadonlyTag(node *JSDocReadonlyTag, tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocReturnTag

func (f *NodeFactory) UpdateJSDocReturnTag(node *JSDocReturnTag, tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocSatisfiesTag

func (f *NodeFactory) UpdateJSDocSatisfiesTag(node *JSDocSatisfiesTag, tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocSeeTag

func (f *NodeFactory) UpdateJSDocSeeTag(node *JSDocSeeTag, tagName *IdentifierNode, nameExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocSignature

func (f *NodeFactory) UpdateJSDocSignature(node *JSDocSignature, typeParameters *TypeParameterList, parameters *NodeList, typeNode *JSDocTag) *Node

func (*NodeFactory) UpdateJSDocTemplateTag

func (f *NodeFactory) UpdateJSDocTemplateTag(node *JSDocTemplateTag, tagName *IdentifierNode, constraint *Node, typeParameters *TypeParameterList, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocThisTag

func (f *NodeFactory) UpdateJSDocThisTag(node *JSDocThisTag, tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocTypeExpression

func (f *NodeFactory) UpdateJSDocTypeExpression(node *JSDocTypeExpression, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateJSDocTypeLiteral

func (f *NodeFactory) UpdateJSDocTypeLiteral(node *JSDocTypeLiteral, jsDocPropertyTags []*Node, isArrayType bool) *Node

func (*NodeFactory) UpdateJSDocTypeTag

func (f *NodeFactory) UpdateJSDocTypeTag(node *JSDocTypeTag, tagName *IdentifierNode, typeExpression *TypeNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocTypedefTag

func (f *NodeFactory) UpdateJSDocTypedefTag(node *JSDocTypedefTag, tagName *IdentifierNode, typeExpression *Node, fullName *Node, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocUnknownTag

func (f *NodeFactory) UpdateJSDocUnknownTag(node *JSDocUnknownTag, tagName *IdentifierNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocVariadicType

func (f *NodeFactory) UpdateJSDocVariadicType(node *JSDocVariadicType, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateJsxAttribute

func (f *NodeFactory) UpdateJsxAttribute(node *JsxAttribute, name *JsxAttributeName, initializer *JsxAttributeValue) *Node

func (*NodeFactory) UpdateJsxAttributes

func (f *NodeFactory) UpdateJsxAttributes(node *JsxAttributes, properties *JsxAttributeList) *Node

func (*NodeFactory) UpdateJsxClosingElement

func (f *NodeFactory) UpdateJsxClosingElement(node *JsxClosingElement, tagName *JsxTagNameExpression) *Node

func (*NodeFactory) UpdateJsxElement

func (f *NodeFactory) UpdateJsxElement(node *JsxElement, openingElement *JsxOpeningElementNode, children *JsxChildList, closingElement *JsxClosingElementNode) *Node

func (*NodeFactory) UpdateJsxExpression

func (f *NodeFactory) UpdateJsxExpression(node *JsxExpression, dotDotDotToken *TokenNode, expression *Expression) *Node

func (*NodeFactory) UpdateJsxFragment

func (f *NodeFactory) UpdateJsxFragment(node *JsxFragment, openingFragment *JsxOpeningFragmentNode, children *JsxChildList, closingFragment *JsxClosingFragmentNode) *Node

func (*NodeFactory) UpdateJsxNamespacedName

func (f *NodeFactory) UpdateJsxNamespacedName(node *JsxNamespacedName, name *IdentifierNode, namespace *IdentifierNode) *Node

func (*NodeFactory) UpdateJsxOpeningElement

func (f *NodeFactory) UpdateJsxOpeningElement(node *JsxOpeningElement, tagName *JsxTagNameExpression, typeArguments *TypeArgumentList, attributes *JsxAttributesNode) *Node

func (*NodeFactory) UpdateJsxSelfClosingElement

func (f *NodeFactory) UpdateJsxSelfClosingElement(node *JsxSelfClosingElement, tagName *JsxTagNameExpression, typeArguments *TypeArgumentList, attributes *JsxAttributesNode) *Node

func (*NodeFactory) UpdateJsxSpreadAttribute

func (f *NodeFactory) UpdateJsxSpreadAttribute(node *JsxSpreadAttribute, expression *Expression) *Node

func (*NodeFactory) UpdateLabeledStatement

func (f *NodeFactory) UpdateLabeledStatement(node *LabeledStatement, label *IdentifierNode, statement *Statement) *Node

func (*NodeFactory) UpdateLiteralTypeNode

func (f *NodeFactory) UpdateLiteralTypeNode(node *LiteralTypeNode, literal *Node) *Node

func (*NodeFactory) UpdateMappedTypeNode

func (f *NodeFactory) UpdateMappedTypeNode(node *MappedTypeNode, readonlyToken *TokenNode, typeParameter *TypeParameterDeclarationNode, nameType *TypeNode, questionToken *TokenNode, typeNode *TypeNode, members *TypeElementList) *Node

func (*NodeFactory) UpdateMetaProperty

func (f *NodeFactory) UpdateMetaProperty(node *MetaProperty, name *IdentifierNode) *Node

func (*NodeFactory) UpdateMethodDeclaration

func (f *NodeFactory) UpdateMethodDeclaration(node *MethodDeclaration, modifiers *ModifierList, asteriskToken *TokenNode, name *PropertyName, postfixToken *TokenNode, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) UpdateMethodSignatureDeclaration

func (f *NodeFactory) UpdateMethodSignatureDeclaration(node *MethodSignatureDeclaration, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode) *Node

func (*NodeFactory) UpdateMissingDeclaration

func (f *NodeFactory) UpdateMissingDeclaration(node *MissingDeclaration, modifiers *ModifierList) *Node

func (*NodeFactory) UpdateModuleBlock

func (f *NodeFactory) UpdateModuleBlock(node *ModuleBlock, statements *StatementList) *Node

func (*NodeFactory) UpdateModuleDeclaration

func (f *NodeFactory) UpdateModuleDeclaration(node *ModuleDeclaration, modifiers *ModifierList, name *ModuleName, body *ModuleBody) *Node

func (*NodeFactory) UpdateNamedExports

func (f *NodeFactory) UpdateNamedExports(node *NamedExports, elements *ExportSpecifierList) *Node

func (*NodeFactory) UpdateNamedImports

func (f *NodeFactory) UpdateNamedImports(node *NamedImports, elements *ImportSpecifierList) *Node

func (*NodeFactory) UpdateNamedTupleMember

func (f *NodeFactory) UpdateNamedTupleMember(node *NamedTupleMember, dotDotDotToken *TokenNode, name *IdentifierNode, questionToken *TokenNode, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateNamespaceExport

func (f *NodeFactory) UpdateNamespaceExport(node *NamespaceExport, name *ModuleExportName) *Node

func (*NodeFactory) UpdateNamespaceExportDeclaration

func (f *NodeFactory) UpdateNamespaceExportDeclaration(node *NamespaceExportDeclaration, modifiers *ModifierList, name *IdentifierNode) *Node

func (*NodeFactory) UpdateNamespaceImport

func (f *NodeFactory) UpdateNamespaceImport(node *NamespaceImport, name *IdentifierNode) *Node

func (*NodeFactory) UpdateNewExpression

func (f *NodeFactory) UpdateNewExpression(node *NewExpression, expression *Expression, typeArguments *TypeArgumentList, arguments *ArgumentList) *Node

func (*NodeFactory) UpdateNonNullExpression

func (f *NodeFactory) UpdateNonNullExpression(node *NonNullExpression, expression *Expression) *Node

func (*NodeFactory) UpdateObjectLiteralExpression

func (f *NodeFactory) UpdateObjectLiteralExpression(node *ObjectLiteralExpression, properties *PropertyDefinitionList) *Node

func (*NodeFactory) UpdateOptionalTypeNode

func (f *NodeFactory) UpdateOptionalTypeNode(node *OptionalTypeNode, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateParameterDeclaration

func (f *NodeFactory) UpdateParameterDeclaration(node *ParameterDeclaration, modifiers *ModifierList, dotDotDotToken *TokenNode, name *BindingName, questionToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) UpdateParenthesizedExpression

func (f *NodeFactory) UpdateParenthesizedExpression(node *ParenthesizedExpression, expression *Expression) *Node

func (*NodeFactory) UpdateParenthesizedTypeNode

func (f *NodeFactory) UpdateParenthesizedTypeNode(node *ParenthesizedTypeNode, typeNode *TypeNode) *Node

func (*NodeFactory) UpdatePartiallyEmittedExpression

func (f *NodeFactory) UpdatePartiallyEmittedExpression(node *PartiallyEmittedExpression, expression *Expression) *Node

func (*NodeFactory) UpdatePostfixUnaryExpression

func (f *NodeFactory) UpdatePostfixUnaryExpression(node *PostfixUnaryExpression, operand *Expression) *Node

func (*NodeFactory) UpdatePrefixUnaryExpression

func (f *NodeFactory) UpdatePrefixUnaryExpression(node *PrefixUnaryExpression, operand *Expression) *Node

func (*NodeFactory) UpdatePropertyAccessExpression

func (f *NodeFactory) UpdatePropertyAccessExpression(node *PropertyAccessExpression, expression *Expression, questionDotToken *TokenNode, name *MemberName) *Node

func (*NodeFactory) UpdatePropertyAssignment

func (f *NodeFactory) UpdatePropertyAssignment(node *PropertyAssignment, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, initializer *Expression) *Node

func (*NodeFactory) UpdatePropertyDeclaration

func (f *NodeFactory) UpdatePropertyDeclaration(node *PropertyDeclaration, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) UpdatePropertySignatureDeclaration

func (f *NodeFactory) UpdatePropertySignatureDeclaration(node *PropertySignatureDeclaration, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) UpdateQualifiedName

func (f *NodeFactory) UpdateQualifiedName(node *QualifiedName, left *EntityName, right *IdentifierNode) *Node

func (*NodeFactory) UpdateRestTypeNode

func (f *NodeFactory) UpdateRestTypeNode(node *RestTypeNode, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateReturnStatement

func (f *NodeFactory) UpdateReturnStatement(node *ReturnStatement, expression *Expression) *Node

func (*NodeFactory) UpdateSatisfiesExpression

func (f *NodeFactory) UpdateSatisfiesExpression(node *SatisfiesExpression, expression *Expression, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateSetAccessorDeclaration

func (f *NodeFactory) UpdateSetAccessorDeclaration(node *SetAccessorDeclaration, modifiers *ModifierList, name *PropertyName, typeParameters *TypeParameterList, parameters *ParameterList, returnType *TypeNode, body *BlockNode) *Node

func (*NodeFactory) UpdateShorthandPropertyAssignment

func (f *NodeFactory) UpdateShorthandPropertyAssignment(node *ShorthandPropertyAssignment, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, equalsToken *TokenNode, objectAssignmentInitializer *Expression) *Node

func (*NodeFactory) UpdateSourceFile

func (f *NodeFactory) UpdateSourceFile(node *SourceFile, statements *StatementList) *Node

func (*NodeFactory) UpdateSpreadAssignment

func (f *NodeFactory) UpdateSpreadAssignment(node *SpreadAssignment, expression *Expression) *Node

func (*NodeFactory) UpdateSpreadElement

func (f *NodeFactory) UpdateSpreadElement(node *SpreadElement, expression *Expression) *Node

func (*NodeFactory) UpdateSwitchStatement

func (f *NodeFactory) UpdateSwitchStatement(node *SwitchStatement, expression *Expression, caseBlock *CaseBlockNode) *Node

func (*NodeFactory) UpdateTaggedTemplateExpression

func (f *NodeFactory) UpdateTaggedTemplateExpression(node *TaggedTemplateExpression, tag *Expression, questionDotToken *TokenNode, typeArguments *TypeArgumentList, template *TemplateLiteral) *Node

func (*NodeFactory) UpdateTemplateExpression

func (f *NodeFactory) UpdateTemplateExpression(node *TemplateExpression, head *TemplateHeadNode, templateSpans *TemplateSpanList) *Node

func (*NodeFactory) UpdateTemplateLiteralTypeNode

func (f *NodeFactory) UpdateTemplateLiteralTypeNode(node *TemplateLiteralTypeNode, head *TemplateHeadNode, templateSpans *TemplateLiteralTypeSpanList) *Node

func (*NodeFactory) UpdateTemplateLiteralTypeSpan

func (f *NodeFactory) UpdateTemplateLiteralTypeSpan(node *TemplateLiteralTypeSpan, typeNode *TypeNode, literal *TemplateMiddleOrTail) *Node

func (*NodeFactory) UpdateTemplateSpan

func (f *NodeFactory) UpdateTemplateSpan(node *TemplateSpan, expression *Expression, literal *TemplateMiddleOrTail) *Node

func (*NodeFactory) UpdateThrowStatement

func (f *NodeFactory) UpdateThrowStatement(node *ThrowStatement, expression *Expression) *Node

func (*NodeFactory) UpdateTryStatement

func (f *NodeFactory) UpdateTryStatement(node *TryStatement, tryBlock *BlockNode, catchClause *CatchClauseNode, finallyBlock *BlockNode) *Node

func (*NodeFactory) UpdateTupleTypeNode

func (f *NodeFactory) UpdateTupleTypeNode(node *TupleTypeNode, elements *TypeList) *Node

func (*NodeFactory) UpdateTypeAliasDeclaration

func (f *NodeFactory) UpdateTypeAliasDeclaration(node *TypeAliasDeclaration, modifiers *ModifierList, name *IdentifierNode, typeParameters *TypeParameterList, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateTypeAssertion

func (f *NodeFactory) UpdateTypeAssertion(node *TypeAssertion, typeNode *TypeNode, expression *Expression) *Node

func (*NodeFactory) UpdateTypeLiteralNode

func (f *NodeFactory) UpdateTypeLiteralNode(node *TypeLiteralNode, members *TypeElementList) *Node

func (*NodeFactory) UpdateTypeOfExpression

func (f *NodeFactory) UpdateTypeOfExpression(node *TypeOfExpression, expression *Expression) *Node

func (*NodeFactory) UpdateTypeOperatorNode

func (f *NodeFactory) UpdateTypeOperatorNode(node *TypeOperatorNode, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateTypeParameterDeclaration

func (f *NodeFactory) UpdateTypeParameterDeclaration(node *TypeParameterDeclaration, modifiers *ModifierList, name *IdentifierNode, constraint *TypeNode, defaultType *TypeNode) *Node

func (*NodeFactory) UpdateTypePredicateNode

func (f *NodeFactory) UpdateTypePredicateNode(node *TypePredicateNode, assertsModifier *TokenNode, parameterName *TypePredicateParameterName, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateTypeQueryNode

func (f *NodeFactory) UpdateTypeQueryNode(node *TypeQueryNode, exprName *EntityName, typeArguments *TypeArgumentList) *Node

func (*NodeFactory) UpdateTypeReferenceNode

func (f *NodeFactory) UpdateTypeReferenceNode(node *TypeReferenceNode, typeName *EntityName, typeArguments *TypeArgumentList) *Node

func (*NodeFactory) UpdateUnionTypeNode

func (f *NodeFactory) UpdateUnionTypeNode(node *UnionTypeNode, types *TypeList) *Node

func (*NodeFactory) UpdateVariableDeclaration

func (f *NodeFactory) UpdateVariableDeclaration(node *VariableDeclaration, name *BindingName, exclamationToken *TokenNode, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) UpdateVariableDeclarationList

func (f *NodeFactory) UpdateVariableDeclarationList(node *VariableDeclarationList, declarations *VariableDeclarationNodeList) *Node

func (*NodeFactory) UpdateVariableStatement

func (f *NodeFactory) UpdateVariableStatement(node *VariableStatement, modifiers *ModifierList, declarationList *VariableDeclarationListNode) *Node

func (*NodeFactory) UpdateVoidExpression

func (f *NodeFactory) UpdateVoidExpression(node *VoidExpression, expression *Expression) *Node

func (*NodeFactory) UpdateWhileStatement

func (f *NodeFactory) UpdateWhileStatement(node *WhileStatement, expression *Expression, statement *Statement) *Node

func (*NodeFactory) UpdateWithStatement

func (f *NodeFactory) UpdateWithStatement(node *WithStatement, expression *Expression, statement *Statement) *Node

func (*NodeFactory) UpdateYieldExpression

func (f *NodeFactory) UpdateYieldExpression(node *YieldExpression, asteriskToken *TokenNode, expression *Expression) *Node

type NodeFactoryHooks

type NodeFactoryHooks struct {
	OnCreate func(node *Node)                 // Hooks the creation of a node.
	OnUpdate func(node *Node, original *Node) // Hooks the updating of a node.
	OnClone  func(node *Node, original *Node) // Hooks the cloning of a node.
}

type NodeFlags

type NodeFlags uint32
const (
	NodeFlagsNone                            NodeFlags = 0
	NodeFlagsLet                             NodeFlags = 1 << 0  // Variable declaration
	NodeFlagsConst                           NodeFlags = 1 << 1  // Variable declaration
	NodeFlagsUsing                           NodeFlags = 1 << 2  // Variable declaration
	NodeFlagsNestedNamespace                 NodeFlags = 1 << 3  // Namespace declaration
	NodeFlagsSynthesized                     NodeFlags = 1 << 4  // Node was synthesized during transformation
	NodeFlagsNamespace                       NodeFlags = 1 << 5  // Namespace declaration
	NodeFlagsOptionalChain                   NodeFlags = 1 << 6  // Chained MemberExpression rooted to a pseudo-OptionalExpression
	NodeFlagsExportContext                   NodeFlags = 1 << 7  // Export context (initialized by binding)
	NodeFlagsContainsThis                    NodeFlags = 1 << 8  // Interface contains references to "this"
	NodeFlagsHasImplicitReturn               NodeFlags = 1 << 9  // If function implicitly returns on one of codepaths (initialized by binding)
	NodeFlagsHasExplicitReturn               NodeFlags = 1 << 10 // If function has explicit reachable return on one of codepaths (initialized by binding)
	NodeFlagsGlobalAugmentation              NodeFlags = 1 << 11 // Set if module declaration is an augmentation for the global scope
	NodeFlagsHasAsyncFunctions               NodeFlags = 1 << 12 // If the file has async functions (initialized by binding)
	NodeFlagsDisallowInContext               NodeFlags = 1 << 13 // If node was parsed in a context where 'in-expressions' are not allowed
	NodeFlagsYieldContext                    NodeFlags = 1 << 14 // If node was parsed in the 'yield' context created when parsing a generator
	NodeFlagsDecoratorContext                NodeFlags = 1 << 15 // If node was parsed as part of a decorator
	NodeFlagsAwaitContext                    NodeFlags = 1 << 16 // If node was parsed in the 'await' context created when parsing an async function
	NodeFlagsDisallowConditionalTypesContext NodeFlags = 1 << 17 // If node was parsed in a context where conditional types are not allowed
	NodeFlagsThisNodeHasError                NodeFlags = 1 << 18 // If the parser encountered an error when parsing the code that created this node
	NodeFlagsJavaScriptFile                  NodeFlags = 1 << 19 // If node was parsed in a JavaScript
	NodeFlagsThisNodeOrAnySubNodesHasError   NodeFlags = 1 << 20 // If this node or any of its children had an error
	NodeFlagsHasAggregatedChildData          NodeFlags = 1 << 21 // If we've computed data from children and cached it in this node

	// These flags will be set when the parser encounters a dynamic import expression or 'import.meta' to avoid
	// walking the tree if the flags are not set. However, these flags are just a approximation
	// (hence why it's named "PossiblyContainsDynamicImport") because once set, the flags never get cleared.
	// During editing, if a dynamic import is removed, incremental parsing will *NOT* clear this flag.
	// This means that the tree will always be traversed during module resolution, or when looking for external module indicators.
	// However, the removal operation should not occur often and in the case of the
	// removal, it is likely that users will add the import anyway.
	// The advantage of this approach is its simplicity. For the case of batch compilation,
	// we guarantee that users won't have to pay the price of walking the tree if a dynamic import isn't used.
	NodeFlagsPossiblyContainsDynamicImport NodeFlags = 1 << 22
	NodeFlagsPossiblyContainsImportMeta    NodeFlags = 1 << 23

	NodeFlagsHasJSDoc        NodeFlags = 1 << 24 // If node has preceding JSDoc comment(s)
	NodeFlagsJSDoc           NodeFlags = 1 << 25 // If node was parsed inside jsdoc
	NodeFlagsAmbient         NodeFlags = 1 << 26 // If node was inside an ambient context -- a declaration file, or inside something with the `declare` modifier.
	NodeFlagsInWithStatement NodeFlags = 1 << 27 // If any ancestor of node was the `statement` of a WithStatement (not the `expression`)
	NodeFlagsJsonFile        NodeFlags = 1 << 28 // If node was parsed in a Json
	NodeFlagsDeprecated      NodeFlags = 1 << 30 // If has '@deprecated' JSDoc tag

	NodeFlagsBlockScoped = NodeFlagsLet | NodeFlagsConst | NodeFlagsUsing
	NodeFlagsConstant    = NodeFlagsConst | NodeFlagsUsing
	NodeFlagsAwaitUsing  = NodeFlagsConst | NodeFlagsUsing // Variable declaration (NOTE: on a single node these flags would otherwise be mutually exclusive)

	NodeFlagsReachabilityCheckFlags   = NodeFlagsHasImplicitReturn | NodeFlagsHasExplicitReturn
	NodeFlagsReachabilityAndEmitFlags = NodeFlagsReachabilityCheckFlags | NodeFlagsHasAsyncFunctions

	// Parsing context flags
	NodeFlagsContextFlags NodeFlags = NodeFlagsDisallowInContext | NodeFlagsDisallowConditionalTypesContext | NodeFlagsYieldContext | NodeFlagsDecoratorContext | NodeFlagsAwaitContext | NodeFlagsJavaScriptFile | NodeFlagsInWithStatement | NodeFlagsAmbient

	// Exclude these flags when parsing a Type
	NodeFlagsTypeExcludesFlags NodeFlags = NodeFlagsYieldContext | NodeFlagsAwaitContext

	// Represents all flags that are potentially set once and
	// never cleared on SourceFiles which get re-used in between incremental parses.
	// See the comment above on `PossiblyContainsDynamicImport` and `PossiblyContainsImportMeta`.
	NodeFlagsPermanentlySetIncrementalFlags NodeFlags = NodeFlagsPossiblyContainsDynamicImport | NodeFlagsPossiblyContainsImportMeta

	// The following flags repurpose other NodeFlags as different meanings for Identifier nodes
	NodeFlagsIdentifierHasExtendedUnicodeEscape NodeFlags = NodeFlagsContainsThis      // Indicates whether the identifier contains an extended unicode escape sequence
	NodeFlagsIdentifierIsInJSDocNamespace       NodeFlags = NodeFlagsHasAsyncFunctions // Indicates whether the identifier is part of a JSDoc namespace
)

func GetCombinedNodeFlags

func GetCombinedNodeFlags(node *Node) NodeFlags

type NodeId

type NodeId uint64

func GetNodeId

func GetNodeId(node *Node) NodeId

type NodeList

type NodeList struct {
	Loc   core.TextRange
	Nodes []*Node
}

func (*NodeList) Clone

func (list *NodeList) Clone(f *NodeFactory) *NodeList

func (*NodeList) End

func (list *NodeList) End() int

func (*NodeList) HasTrailingComma

func (list *NodeList) HasTrailingComma() bool

func (*NodeList) Pos

func (list *NodeList) Pos() int

type NodeVisitor

type NodeVisitor struct {
	Visit   func(node *Node) *Node // Required. The callback used to visit a node
	Factory *NodeFactory           // Required. The NodeFactory used to produce new nodes when passed to VisitEachChild
	Hooks   NodeVisitorHooks       // Hooks to be invoked when visiting a node
}

func NewNodeVisitor

func NewNodeVisitor(visit func(node *Node) *Node, factory *NodeFactory, hooks NodeVisitorHooks) *NodeVisitor

func (*NodeVisitor) VisitEachChild

func (v *NodeVisitor) VisitEachChild(node *Node) *Node

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

func (*NodeVisitor) VisitEmbeddedStatement

func (v *NodeVisitor) VisitEmbeddedStatement(node *Statement) *Statement

Visits an embedded Statement (i.e., the single statement body of a loop, `if..else` branch, etc.), possibly returning a new Statement in its place.

  • If the input node is nil, then the output is nil.
  • If v.Visit is nil, then the output is the input.
  • If v.Visit returns nil, then the output is nil.
  • If v.Visit returns a SyntaxList Node, then the output is either the only child of the SyntaxList Node, or a Block containing the nodes in the list.

func (*NodeVisitor) VisitModifiers

func (v *NodeVisitor) VisitModifiers(nodes *ModifierList) *ModifierList

Visits a ModifierList, possibly returning a new ModifierList in its place.

  • If the input ModifierList is nil, the output is nil.
  • If v.Visit is nil, then the output is the input.
  • If v.Visit returns nil, the visited Node will be absent in the output.
  • If v.Visit returns a different Node than the input, a new ModifierList will be generated and returned.
  • If v.Visit returns a SyntaxList Node, then the children of that node will be merged into the output and a new NodeList will be returned.
  • If this method returns a new NodeList for any reason, it will have the same Loc as the input NodeList.

func (*NodeVisitor) VisitNode

func (v *NodeVisitor) VisitNode(node *Node) *Node

Visits a Node, possibly returning a new Node in its place.

  • If the input node is nil, then the output is nil.
  • If v.Visit is nil, then the output is the input.
  • If v.Visit returns nil, then the output is nil.
  • If v.Visit returns a SyntaxList Node, then the output is the only child of the SyntaxList Node.

func (*NodeVisitor) VisitNodes

func (v *NodeVisitor) VisitNodes(nodes *NodeList) *NodeList

Visits a NodeList, possibly returning a new NodeList in its place.

  • If the input NodeList is nil, the output is nil.
  • If v.Visit is nil, then the output is the input.
  • If v.Visit returns nil, the visited Node will be absent in the output.
  • If v.Visit returns a different Node than the input, a new NodeList will be generated and returned.
  • If v.Visit returns a SyntaxList Node, then the children of that node will be merged into the output and a new NodeList will be returned.
  • If this method returns a new NodeList for any reason, it will have the same Loc as the input NodeList.

func (*NodeVisitor) VisitSlice

func (v *NodeVisitor) VisitSlice(nodes []*Node) (result []*Node, changed bool)

Visits a slice of Nodes, returning the resulting slice and a value indicating whether the slice was changed.

  • If the input slice is nil, the output is nil.
  • If v.Visit is nil, then the output is the input.
  • If v.Visit returns nil, the visited Node will be absent in the output.
  • If v.Visit returns a different Node than the input, a new slice will be generated and returned.
  • If v.Visit returns a SyntaxList Node, then the children of that node will be merged into the output and a new slice will be returned.

func (*NodeVisitor) VisitSourceFile

func (v *NodeVisitor) VisitSourceFile(node *SourceFile) *SourceFile

type NodeVisitorHooks

type NodeVisitorHooks struct {
	VisitNode               func(node *Node, v *NodeVisitor) *Node                           // Overrides visiting a Node. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitToken              func(node *TokenNode, v *NodeVisitor) *Node                      // Overrides visiting a TokenNode. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitNodes              func(nodes *NodeList, v *NodeVisitor) *NodeList                  // Overrides visiting a NodeList. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitModifiers          func(nodes *ModifierList, v *NodeVisitor) *ModifierList          // Overrides visiting a ModifierList. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitEmbeddedStatement  func(node *Statement, v *NodeVisitor) *Statement                 // Overrides visiting a Node when it is the embedded statement body of an iteration statement, `if` statement, or `with` statement. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitIterationBody      func(node *Statement, v *NodeVisitor) *Statement                 // Overrides visiting a Node when it is the embedded statement body body of an iteration statement. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitParameters         func(nodes *ParameterList, v *NodeVisitor) *ParameterList        // Overrides visiting a ParameterList. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitFunctionBody       func(node *BlockOrExpression, v *NodeVisitor) *BlockOrExpression // Overrides visiting a function body. Only invoked by the VisitEachChild method on a given Node subtype.
	VisitTopLevelStatements func(nodes *StatementList, v *NodeVisitor) *StatementList        // Overrides visiting a variable environment. Only invoked by the VisitEachChild method on a given Node subtype.
}

These hooks are used to intercept the default behavior of the visitor

type NonNullExpression

type NonNullExpression struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*NonNullExpression) Clone

func (node *NonNullExpression) Clone(f *NodeFactory) *Node

func (*NonNullExpression) ForEachChild

func (node *NonNullExpression) ForEachChild(v Visitor) bool

func (*NonNullExpression) VisitEachChild

func (node *NonNullExpression) VisitEachChild(v *NodeVisitor) *Node

type NumericLiteral

type NumericLiteral struct {
	ExpressionBase
	LiteralLikeBase
}

func (*NumericLiteral) Clone

func (node *NumericLiteral) Clone(f *NodeFactory) *Node

type ObjectLiteralElement

type ObjectLiteralElement = Node // Node with ObjectLiteralElementBase

type ObjectLiteralElementBase

type ObjectLiteralElementBase struct{}

type ObjectLiteralExpression

type ObjectLiteralExpression struct {
	ExpressionBase
	DeclarationBase
	Properties *NodeList // NodeList[*ObjectLiteralElement]
	MultiLine  bool
}

func (*ObjectLiteralExpression) Clone

func (node *ObjectLiteralExpression) Clone(f *NodeFactory) *Node

func (*ObjectLiteralExpression) ForEachChild

func (node *ObjectLiteralExpression) ForEachChild(v Visitor) bool

func (*ObjectLiteralExpression) VisitEachChild

func (node *ObjectLiteralExpression) VisitEachChild(v *NodeVisitor) *Node

type OmittedExpression

type OmittedExpression struct {
	ExpressionBase
}

func (*OmittedExpression) Clone

func (node *OmittedExpression) Clone(f *NodeFactory) *Node

type OperatorPrecedence

type OperatorPrecedence int
const (
	// Expression:
	//     AssignmentExpression
	//     Expression `,` AssignmentExpression
	OperatorPrecedenceComma OperatorPrecedence = iota
	// NOTE: `Spread` is higher than `Comma` due to how it is parsed in |ElementList|
	// SpreadElement:
	//     `...` AssignmentExpression
	OperatorPrecedenceSpread
	// AssignmentExpression:
	//     ConditionalExpression
	//     YieldExpression
	//     ArrowFunction
	//     AsyncArrowFunction
	//     LeftHandSideExpression `=` AssignmentExpression
	//     LeftHandSideExpression AssignmentOperator AssignmentExpression
	//
	// NOTE: AssignmentExpression is broken down into several precedences due to the requirements
	//       of the parenthesizer rules.
	// AssignmentExpression: YieldExpression
	// YieldExpression:
	//     `yield`
	//     `yield` AssignmentExpression
	//     `yield` `*` AssignmentExpression
	OperatorPrecedenceYield
	// AssignmentExpression: LeftHandSideExpression `=` AssignmentExpression
	// AssignmentExpression: LeftHandSideExpression AssignmentOperator AssignmentExpression
	// AssignmentOperator: one of
	//     `*=` `/=` `%=` `+=` `-=` `<<=` `>>=` `>>>=` `&=` `^=` `|=` `**=`
	OperatorPrecedenceAssignment
	// NOTE: `Conditional` is considered higher than `Assignment` here, but in reality they have
	//       the same precedence.
	// AssignmentExpression: ConditionalExpression
	// ConditionalExpression:
	//     ShortCircuitExpression
	//     ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression
	OperatorPrecedenceConditional
	// ShortCircuitExpression:
	//     LogicalORExpression
	//     CoalesceExpression
	// CoalesceExpression:
	//     CoalesceExpressionHead `??` BitwiseORExpression
	// CoalesceExpressionHead:
	//     CoalesceExpression
	//     BitwiseORExpression
	OperatorPrecedenceCoalesce
	// LogicalORExpression:
	//     LogicalANDExpression
	//     LogicalORExpression `||` LogicalANDExpression
	OperatorPrecedenceLogicalOR
	// LogicalANDExpression:
	//     BitwiseORExpression
	//     LogicalANDExprerssion `&&` BitwiseORExpression
	OperatorPrecedenceLogicalAND
	// BitwiseORExpression:
	//     BitwiseXORExpression
	//     BitwiseORExpression `|` BitwiseXORExpression
	OperatorPrecedenceBitwiseOR
	// BitwiseXORExpression:
	//     BitwiseANDExpression
	//     BitwiseXORExpression `^` BitwiseANDExpression
	OperatorPrecedenceBitwiseXOR
	// BitwiseANDExpression:
	//     EqualityExpression
	//     BitwiseANDExpression `&` EqualityExpression
	OperatorPrecedenceBitwiseAND
	// EqualityExpression:
	//     RelationalExpression
	//     EqualityExpression `==` RelationalExpression
	//     EqualityExpression `!=` RelationalExpression
	//     EqualityExpression `===` RelationalExpression
	//     EqualityExpression `!==` RelationalExpression
	OperatorPrecedenceEquality
	// RelationalExpression:
	//     ShiftExpression
	//     RelationalExpression `<` ShiftExpression
	//     RelationalExpression `>` ShiftExpression
	//     RelationalExpression `<=` ShiftExpression
	//     RelationalExpression `>=` ShiftExpression
	//     RelationalExpression `instanceof` ShiftExpression
	//     RelationalExpression `in` ShiftExpression
	//     [+TypeScript] RelationalExpression `as` Type
	OperatorPrecedenceRelational
	// ShiftExpression:
	//     AdditiveExpression
	//     ShiftExpression `<<` AdditiveExpression
	//     ShiftExpression `>>` AdditiveExpression
	//     ShiftExpression `>>>` AdditiveExpression
	OperatorPrecedenceShift
	// AdditiveExpression:
	//     MultiplicativeExpression
	//     AdditiveExpression `+` MultiplicativeExpression
	//     AdditiveExpression `-` MultiplicativeExpression
	OperatorPrecedenceAdditive
	// MultiplicativeExpression:
	//     ExponentiationExpression
	//     MultiplicativeExpression MultiplicativeOperator ExponentiationExpression
	// MultiplicativeOperator: one of `*`, `/`, `%`
	OperatorPrecedenceMultiplicative
	// ExponentiationExpression:
	//     UnaryExpression
	//     UpdateExpression `**` ExponentiationExpression
	OperatorPrecedenceExponentiation
	// UnaryExpression:
	//     UpdateExpression
	//     `delete` UnaryExpression
	//     `void` UnaryExpression
	//     `typeof` UnaryExpression
	//     `+` UnaryExpression
	//     `-` UnaryExpression
	//     `~` UnaryExpression
	//     `!` UnaryExpression
	//     AwaitExpression
	// UpdateExpression:            // TODO: Do we need to investigate the precedence here?
	//     `++` UnaryExpression
	//     `--` UnaryExpression
	OperatorPrecedenceUnary
	// UpdateExpression:
	//     LeftHandSideExpression
	//     LeftHandSideExpression `++`
	//     LeftHandSideExpression `--`
	OperatorPrecedenceUpdate
	// LeftHandSideExpression:
	//     NewExpression
	// NewExpression:
	//     MemberExpression
	//     `new` NewExpression
	OperatorPrecedenceLeftHandSide
	// LeftHandSideExpression:
	//     OptionalExpression
	// OptionalExpression:
	//     MemberExpression OptionalChain
	//     CallExpression OptionalChain
	//     OptionalExpression OptionalChain
	OperatorPrecedenceOptionalChain
	// LeftHandSideExpression:
	//     CallExpression
	// CallExpression:
	//     CoverCallExpressionAndAsyncArrowHead
	//     SuperCall
	//     ImportCall
	//     CallExpression Arguments
	//     CallExpression `[` Expression `]`
	//     CallExpression `.` IdentifierName
	//     CallExpression TemplateLiteral
	// MemberExpression:
	//     PrimaryExpression
	//     MemberExpression `[` Expression `]`
	//     MemberExpression `.` IdentifierName
	//     MemberExpression TemplateLiteral
	//     SuperProperty
	//     MetaProperty
	//     `new` MemberExpression Arguments
	OperatorPrecedenceMember
	// TODO: JSXElement?
	// PrimaryExpression:
	//     `this`
	//     IdentifierReference
	//     Literal
	//     ArrayLiteral
	//     ObjectLiteral
	//     FunctionExpression
	//     ClassExpression
	//     GeneratorExpression
	//     AsyncFunctionExpression
	//     AsyncGeneratorExpression
	//     RegularExpressionLiteral
	//     TemplateLiteral
	OperatorPrecedencePrimary
	// PrimaryExpression:
	//     CoverParenthesizedExpressionAndArrowParameterList
	OperatorPrecedenceParentheses
	OperatorPrecedenceLowest        = OperatorPrecedenceComma
	OperatorPrecedenceHighest       = OperatorPrecedenceParentheses
	OperatorPrecedenceDisallowComma = OperatorPrecedenceYield
	// -1 is lower than all other precedences. Returning it will cause binary expression
	// parsing to stop.
	OperatorPrecedenceInvalid OperatorPrecedence = -1
)

func GetBinaryOperatorPrecedence

func GetBinaryOperatorPrecedence(operatorKind Kind) OperatorPrecedence

Gets the precedence of a binary operator

func GetExpressionPrecedence

func GetExpressionPrecedence(expression *Expression) OperatorPrecedence

Gets the precedence of an expression

func GetOperatorPrecedence

func GetOperatorPrecedence(nodeKind Kind, operatorKind Kind, flags OperatorPrecedenceFlags) OperatorPrecedence

Gets the precedence of an operator

type OperatorPrecedenceFlags

type OperatorPrecedenceFlags int
const (
	OperatorPrecedenceFlagsNone                OperatorPrecedenceFlags = 0
	OperatorPrecedenceFlagsNewWithoutArguments OperatorPrecedenceFlags = 1 << 0
	OperatorPrecedenceFlagsOptionalChain       OperatorPrecedenceFlags = 1 << 1
)

type OptionalTypeNode

type OptionalTypeNode struct {
	TypeNodeBase
	Type *TypeNode // TypeNode
}

func (*OptionalTypeNode) Clone

func (node *OptionalTypeNode) Clone(f *NodeFactory) *Node

func (*OptionalTypeNode) ForEachChild

func (node *OptionalTypeNode) ForEachChild(v Visitor) bool

func (*OptionalTypeNode) VisitEachChild

func (node *OptionalTypeNode) VisitEachChild(v *NodeVisitor) *Node

type OuterExpressionKinds

type OuterExpressionKinds int16

type ParameterDeclaration

type ParameterDeclaration struct {
	NodeBase
	DeclarationBase
	ModifiersBase
	DotDotDotToken *TokenNode // TokenNode. Present on rest parameter

	QuestionToken *TokenNode  // TokenNode. Present on optional parameter
	Type          *TypeNode   // TypeNode. Optional
	Initializer   *Expression // Expression. Optional
	// contains filtered or unexported fields
}

func (*ParameterDeclaration) Clone

func (node *ParameterDeclaration) Clone(f *NodeFactory) *Node

func (*ParameterDeclaration) ForEachChild

func (node *ParameterDeclaration) ForEachChild(v Visitor) bool

func (*ParameterDeclaration) Name

func (node *ParameterDeclaration) Name() *DeclarationName

func (*ParameterDeclaration) VisitEachChild

func (node *ParameterDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ParameterDeclarationNode

type ParameterDeclarationNode = Node

type ParameterList

type ParameterList = NodeList // NodeList[*ParameterDeclaration]

type ParenthesizedExpression

type ParenthesizedExpression struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*ParenthesizedExpression) Clone

func (node *ParenthesizedExpression) Clone(f *NodeFactory) *Node

func (*ParenthesizedExpression) ForEachChild

func (node *ParenthesizedExpression) ForEachChild(v Visitor) bool

func (*ParenthesizedExpression) VisitEachChild

func (node *ParenthesizedExpression) VisitEachChild(v *NodeVisitor) *Node

type ParenthesizedTypeNode

type ParenthesizedTypeNode struct {
	TypeNodeBase
	Type *TypeNode // TypeNode
}

func (*ParenthesizedTypeNode) Clone

func (node *ParenthesizedTypeNode) Clone(f *NodeFactory) *Node

func (*ParenthesizedTypeNode) ForEachChild

func (node *ParenthesizedTypeNode) ForEachChild(v Visitor) bool

func (*ParenthesizedTypeNode) VisitEachChild

func (node *ParenthesizedTypeNode) VisitEachChild(v *NodeVisitor) *Node

type PartiallyEmittedExpression

type PartiallyEmittedExpression struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*PartiallyEmittedExpression) Clone

func (node *PartiallyEmittedExpression) Clone(f *NodeFactory) *Node

func (*PartiallyEmittedExpression) ForEachChild

func (node *PartiallyEmittedExpression) ForEachChild(v Visitor) bool

func (*PartiallyEmittedExpression) VisitEachChild

func (node *PartiallyEmittedExpression) VisitEachChild(v *NodeVisitor) *Node

type PatternAmbientModule

type PatternAmbientModule struct {
	Pattern core.Pattern
	Symbol  *Symbol
}

type PostfixUnaryExpression

type PostfixUnaryExpression struct {
	ExpressionBase
	Operand  *Expression // Expression
	Operator Kind
}

func (*PostfixUnaryExpression) Clone

func (node *PostfixUnaryExpression) Clone(f *NodeFactory) *Node

func (*PostfixUnaryExpression) ForEachChild

func (node *PostfixUnaryExpression) ForEachChild(v Visitor) bool

func (*PostfixUnaryExpression) VisitEachChild

func (node *PostfixUnaryExpression) VisitEachChild(v *NodeVisitor) *Node

type Pragma

type Pragma struct {
	Name      string
	Args      map[string]PragmaArgument
	ArgsRange CommentRange
}

type PragmaArgument

type PragmaArgument struct {
	core.TextRange
	Name  string
	Value string
}

type PragmaArgumentSpecification

type PragmaArgumentSpecification struct {
	Name        string
	Optional    bool
	CaptureSpan bool
}

type PragmaKindFlags

type PragmaKindFlags = uint8
const (
	PragmaKindTripleSlashXML PragmaKindFlags = 1 << iota
	PragmaKindSingleLine
	PragmaKindMultiLine
	PragmaKindFlagsNone PragmaKindFlags = 0
	PragmaKindAll                       = PragmaKindTripleSlashXML | PragmaKindSingleLine | PragmaKindMultiLine
	PragmaKindDefault                   = PragmaKindAll
)

type PragmaSpecification

type PragmaSpecification struct {
	Args []PragmaArgumentSpecification
	Kind PragmaKindFlags
}

func (*PragmaSpecification) IsTripleSlash

func (spec *PragmaSpecification) IsTripleSlash() bool

type PrefixUnaryExpression

type PrefixUnaryExpression struct {
	ExpressionBase
	Operator Kind
	Operand  *Expression // Expression
}

func (*PrefixUnaryExpression) Clone

func (node *PrefixUnaryExpression) Clone(f *NodeFactory) *Node

func (*PrefixUnaryExpression) ForEachChild

func (node *PrefixUnaryExpression) ForEachChild(v Visitor) bool

func (*PrefixUnaryExpression) VisitEachChild

func (node *PrefixUnaryExpression) VisitEachChild(v *NodeVisitor) *Node

type PrivateIdentifier

type PrivateIdentifier struct {
	ExpressionBase
	Text string
}

func (*PrivateIdentifier) Clone

func (node *PrivateIdentifier) Clone(f *NodeFactory) *Node

type PrivateIdentifierNode

type PrivateIdentifierNode = Node

type PropertyAccessExpression

type PropertyAccessExpression struct {
	ExpressionBase
	FlowNodeBase
	Expression       *Expression // Expression
	QuestionDotToken *TokenNode  // TokenNode
	// contains filtered or unexported fields
}

func (*PropertyAccessExpression) Clone

func (node *PropertyAccessExpression) Clone(f *NodeFactory) *Node

func (*PropertyAccessExpression) ForEachChild

func (node *PropertyAccessExpression) ForEachChild(v Visitor) bool

func (*PropertyAccessExpression) Name

func (*PropertyAccessExpression) VisitEachChild

func (node *PropertyAccessExpression) VisitEachChild(v *NodeVisitor) *Node

type PropertyAssignment

type PropertyAssignment struct {
	NodeBase
	NamedMemberBase
	ObjectLiteralElementBase
	Initializer *Expression // Expression
}

func (*PropertyAssignment) Clone

func (node *PropertyAssignment) Clone(f *NodeFactory) *Node

func (*PropertyAssignment) ForEachChild

func (node *PropertyAssignment) ForEachChild(v Visitor) bool

func (*PropertyAssignment) VisitEachChild

func (node *PropertyAssignment) VisitEachChild(v *NodeVisitor) *Node

type PropertyDeclaration

type PropertyDeclaration struct {
	NodeBase
	NamedMemberBase
	ClassElementBase
	Type        *TypeNode   // TypeNode. Optional
	Initializer *Expression // Expression. Optional
}

func (*PropertyDeclaration) Clone

func (node *PropertyDeclaration) Clone(f *NodeFactory) *Node

func (*PropertyDeclaration) ForEachChild

func (node *PropertyDeclaration) ForEachChild(v Visitor) bool

func (*PropertyDeclaration) VisitEachChild

func (node *PropertyDeclaration) VisitEachChild(v *NodeVisitor) *Node

type PropertyDefinitionList

type PropertyDefinitionList = NodeList // NodeList[*ObjectLiteralElement]

type PropertyName

type PropertyName = Node // Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | BigIntLiteral

type PropertySignatureDeclaration

type PropertySignatureDeclaration struct {
	NodeBase
	NamedMemberBase
	TypeElementBase
	Type        *TypeNode   // TypeNode
	Initializer *Expression // Expression. For error reporting purposes
}

func (*PropertySignatureDeclaration) Clone

func (*PropertySignatureDeclaration) ForEachChild

func (node *PropertySignatureDeclaration) ForEachChild(v Visitor) bool

func (*PropertySignatureDeclaration) VisitEachChild

func (node *PropertySignatureDeclaration) VisitEachChild(v *NodeVisitor) *Node

type QualifiedName

type QualifiedName struct {
	NodeBase
	FlowNodeBase
	Left  *EntityName     // EntityName
	Right *IdentifierNode // IdentifierNode
}

func (*QualifiedName) Clone

func (node *QualifiedName) Clone(f *NodeFactory) *Node

func (*QualifiedName) ForEachChild

func (node *QualifiedName) ForEachChild(v Visitor) bool

func (*QualifiedName) VisitEachChild

func (node *QualifiedName) VisitEachChild(v *NodeVisitor) *Node

type RegularExpressionLiteral

type RegularExpressionLiteral struct {
	ExpressionBase
	LiteralLikeBase
}

func (*RegularExpressionLiteral) Clone

func (node *RegularExpressionLiteral) Clone(f *NodeFactory) *Node

type RestTypeNode

type RestTypeNode struct {
	TypeNodeBase
	Type *TypeNode // TypeNode
}

func (*RestTypeNode) Clone

func (node *RestTypeNode) Clone(f *NodeFactory) *Node

func (*RestTypeNode) ForEachChild

func (node *RestTypeNode) ForEachChild(v Visitor) bool

func (*RestTypeNode) VisitEachChild

func (node *RestTypeNode) VisitEachChild(v *NodeVisitor) *Node

type ReturnStatement

type ReturnStatement struct {
	StatementBase
	Expression *Expression // Expression. Optional
}

func (*ReturnStatement) Clone

func (node *ReturnStatement) Clone(f *NodeFactory) *Node

func (*ReturnStatement) ForEachChild

func (node *ReturnStatement) ForEachChild(v Visitor) bool

func (*ReturnStatement) VisitEachChild

func (node *ReturnStatement) VisitEachChild(v *NodeVisitor) *Node

type SatisfiesExpression

type SatisfiesExpression struct {
	ExpressionBase
	Expression *Expression // Expression
	Type       *TypeNode   // TypeNode
}

func (*SatisfiesExpression) Clone

func (node *SatisfiesExpression) Clone(f *NodeFactory) *Node

func (*SatisfiesExpression) ForEachChild

func (node *SatisfiesExpression) ForEachChild(v Visitor) bool

func (*SatisfiesExpression) VisitEachChild

func (node *SatisfiesExpression) VisitEachChild(v *NodeVisitor) *Node

type SemanticMeaning

type SemanticMeaning int32
const (
	SemanticMeaningNone      SemanticMeaning = 0
	SemanticMeaningValue     SemanticMeaning = 1 << 0
	SemanticMeaningType      SemanticMeaning = 1 << 1
	SemanticMeaningNamespace SemanticMeaning = 1 << 2
	SemanticMeaningAll       SemanticMeaning = SemanticMeaningValue | SemanticMeaningType | SemanticMeaningNamespace
)

func GetMeaningFromDeclaration

func GetMeaningFromDeclaration(node *Node) SemanticMeaning

type SemicolonClassElement

type SemicolonClassElement struct {
	NodeBase
	DeclarationBase
	ClassElementBase
}

func (*SemicolonClassElement) Clone

func (node *SemicolonClassElement) Clone(f *NodeFactory) *Node

type SetAccessorDeclaration

type SetAccessorDeclaration struct {
	AccessorDeclarationBase
}

func (*SetAccessorDeclaration) Clone

func (node *SetAccessorDeclaration) Clone(f *NodeFactory) *Node

func (*SetAccessorDeclaration) VisitEachChild

func (node *SetAccessorDeclaration) VisitEachChild(v *NodeVisitor) *Node

type ShorthandPropertyAssignment

type ShorthandPropertyAssignment struct {
	NodeBase
	NamedMemberBase
	ObjectLiteralElementBase
	EqualsToken                 *TokenNode
	ObjectAssignmentInitializer *Expression // Optional
}

func (*ShorthandPropertyAssignment) Clone

func (node *ShorthandPropertyAssignment) Clone(f *NodeFactory) *Node

func (*ShorthandPropertyAssignment) ForEachChild

func (node *ShorthandPropertyAssignment) ForEachChild(v Visitor) bool

func (*ShorthandPropertyAssignment) VisitEachChild

func (node *ShorthandPropertyAssignment) VisitEachChild(v *NodeVisitor) *Node

type SignatureDeclaration

type SignatureDeclaration = Node // CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;

type SourceFile

type SourceFile struct {
	NodeBase
	DeclarationBase
	LocalsContainerBase

	Text string

	Statements *NodeList // NodeList[*Statement]

	LanguageVersion             core.ScriptTarget
	LanguageVariant             core.LanguageVariant
	ScriptKind                  core.ScriptKind
	IsDeclarationFile           bool
	HasNoDefaultLib             bool
	UsesUriStyleNodeCoreModules core.Tristate
	Identifiers                 map[string]string
	Imports                     []*LiteralLikeNode // []LiteralLikeNode
	ModuleAugmentations         []*ModuleName      // []ModuleName
	AmbientModuleNames          []string
	CommentDirectives           []CommentDirective

	Pragmas                 []Pragma
	ReferencedFiles         []*FileReference
	TypeReferenceDirectives []*FileReference
	LibReferenceDirectives  []*FileReference

	BindSuggestionDiagnostics []*Diagnostic
	EndFlowNode               *FlowNode
	SymbolCount               int
	ClassifiableNames         core.Set[string]
	PatternAmbientModules     []PatternAmbientModule

	Version int

	ImpliedNodeFormat       core.ModuleKind
	CommonJsModuleIndicator *Node
	ExternalModuleIndicator *Node
	JsGlobalAugmentations   SymbolTable
	// contains filtered or unexported fields
}

func GetSourceFileOfNode

func GetSourceFileOfNode(node *Node) *SourceFile

Walks up the parents of a node to find the containing SourceFile

func (*SourceFile) BindDiagnostics

func (node *SourceFile) BindDiagnostics() []*Diagnostic

func (*SourceFile) BindOnce

func (node *SourceFile) BindOnce(bind func())

func (*SourceFile) Clone

func (node *SourceFile) Clone(f *NodeFactory) *Node

func (*SourceFile) Diagnostics

func (node *SourceFile) Diagnostics() []*Diagnostic

func (*SourceFile) FileName

func (node *SourceFile) FileName() string

func (*SourceFile) ForEachChild

func (node *SourceFile) ForEachChild(v Visitor) bool

func (*SourceFile) GetOrCreateToken

func (node *SourceFile) GetOrCreateToken(
	kind Kind,
	pos int,
	end int,
	parent *Node,
) *TokenNode

func (*SourceFile) IsBound

func (node *SourceFile) IsBound() bool

func (*SourceFile) JSDocCache

func (node *SourceFile) JSDocCache() map[*Node][]*Node

func (*SourceFile) JSDocDiagnostics

func (node *SourceFile) JSDocDiagnostics() []*Diagnostic

func (*SourceFile) LineMap

func (node *SourceFile) LineMap() []core.TextPos

func (*SourceFile) Path

func (node *SourceFile) Path() tspath.Path

func (*SourceFile) SetBindDiagnostics

func (node *SourceFile) SetBindDiagnostics(diags []*Diagnostic)

func (*SourceFile) SetDiagnostics

func (node *SourceFile) SetDiagnostics(diags []*Diagnostic)

func (*SourceFile) SetJSDocCache

func (node *SourceFile) SetJSDocCache(cache map[*Node][]*Node)

func (*SourceFile) SetJSDocDiagnostics

func (node *SourceFile) SetJSDocDiagnostics(diags []*Diagnostic)

func (*SourceFile) VisitEachChild

func (node *SourceFile) VisitEachChild(v *NodeVisitor) *Node

type SourceFileNode

type SourceFileNode = Node

type SpreadAssignment

type SpreadAssignment struct {
	NodeBase
	DeclarationBase
	ObjectLiteralElementBase
	Expression *Expression // Expression
}

func (*SpreadAssignment) Clone

func (node *SpreadAssignment) Clone(f *NodeFactory) *Node

func (*SpreadAssignment) ForEachChild

func (node *SpreadAssignment) ForEachChild(v Visitor) bool

func (*SpreadAssignment) VisitEachChild

func (node *SpreadAssignment) VisitEachChild(v *NodeVisitor) *Node

type SpreadElement

type SpreadElement struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*SpreadElement) Clone

func (node *SpreadElement) Clone(f *NodeFactory) *Node

func (*SpreadElement) ForEachChild

func (node *SpreadElement) ForEachChild(v Visitor) bool

func (*SpreadElement) VisitEachChild

func (node *SpreadElement) VisitEachChild(v *NodeVisitor) *Node

type Statement

type Statement = Node // Node with StatementBase

type StatementBase

type StatementBase struct {
	NodeBase
	FlowNodeBase
}

type StatementList

type StatementList = NodeList // NodeList[*Statement]

func GetStatementsOfBlock

func GetStatementsOfBlock(block *Node) *StatementList

type StringLiteral

type StringLiteral struct {
	ExpressionBase
	LiteralLikeBase
}

func (*StringLiteral) Clone

func (node *StringLiteral) Clone(f *NodeFactory) *Node

type StringLiteralNode

type StringLiteralNode = Node

type SwitchStatement

type SwitchStatement struct {
	StatementBase
	Expression *Expression    // Expression
	CaseBlock  *CaseBlockNode // CaseBlockNode
}

func (*SwitchStatement) Clone

func (node *SwitchStatement) Clone(f *NodeFactory) *Node

func (*SwitchStatement) ForEachChild

func (node *SwitchStatement) ForEachChild(v Visitor) bool

func (*SwitchStatement) VisitEachChild

func (node *SwitchStatement) VisitEachChild(v *NodeVisitor) *Node

type Symbol

type Symbol struct {
	Flags            SymbolFlags
	CheckFlags       CheckFlags // Non-zero only in transient symbols created by Checker
	Name             string
	Declarations     []*Node
	ValueDeclaration *Node
	Members          SymbolTable
	Exports          SymbolTable

	Parent                       *Symbol
	ExportSymbol                 *Symbol
	AssignmentDeclarationMembers core.Set[*Node] // Set of detected assignment declarations
	GlobalExports                SymbolTable     // Conditional global UMD exports
	// contains filtered or unexported fields
}

type SymbolFlags

type SymbolFlags uint32

type SymbolId

type SymbolId uint64

func GetSymbolId

func GetSymbolId(symbol *Symbol) SymbolId

type SymbolTable

type SymbolTable map[string]*Symbol

func GetExports

func GetExports(symbol *Symbol) SymbolTable

func GetLocals

func GetLocals(container *Node) SymbolTable

func GetMembers

func GetMembers(symbol *Symbol) SymbolTable

func GetSymbolTable

func GetSymbolTable(data *SymbolTable) SymbolTable

type SyntaxList

type SyntaxList struct {
	NodeBase
	Children []*Node
}

func (*SyntaxList) Clone

func (node *SyntaxList) Clone(f *NodeFactory) *Node

func (*SyntaxList) ForEachChild

func (node *SyntaxList) ForEachChild(v Visitor) bool

type SyntheticExpression

type SyntheticExpression struct {
	ExpressionBase
	Type            any
	IsSpread        bool
	TupleNameSource *Node
}

func (*SyntheticExpression) Clone

func (node *SyntheticExpression) Clone(f *NodeFactory) *Node

type TaggedTemplateExpression

type TaggedTemplateExpression struct {
	ExpressionBase
	Tag              *Expression      // Expression
	QuestionDotToken *TokenNode       // TokenNode. For error reporting purposes only
	TypeArguments    *NodeList        // NodeList[*TypeNode]. Optional
	Template         *TemplateLiteral // TemplateLiteral
}

func (*TaggedTemplateExpression) Clone

func (node *TaggedTemplateExpression) Clone(f *NodeFactory) *Node

func (*TaggedTemplateExpression) ForEachChild

func (node *TaggedTemplateExpression) ForEachChild(v Visitor) bool

func (*TaggedTemplateExpression) VisitEachChild

func (node *TaggedTemplateExpression) VisitEachChild(v *NodeVisitor) *Node

type TemplateExpression

type TemplateExpression struct {
	ExpressionBase
	Head          *TemplateHeadNode // TemplateHeadNode
	TemplateSpans *NodeList         // NodeList[*TemplateSpanNode]
}

func (*TemplateExpression) Clone

func (node *TemplateExpression) Clone(f *NodeFactory) *Node

func (*TemplateExpression) ForEachChild

func (node *TemplateExpression) ForEachChild(v Visitor) bool

func (*TemplateExpression) VisitEachChild

func (node *TemplateExpression) VisitEachChild(v *NodeVisitor) *Node

type TemplateHead

type TemplateHead struct {
	NodeBase
	TemplateLiteralLikeBase
}

func (*TemplateHead) Clone

func (node *TemplateHead) Clone(f *NodeFactory) *Node

type TemplateHeadNode

type TemplateHeadNode = Node

type TemplateLiteral

type TemplateLiteral = Node // TemplateExpression | NoSubstitutionTemplateLiteral

type TemplateLiteralLikeBase

type TemplateLiteralLikeBase struct {
	LiteralLikeBase
	RawText       string
	TemplateFlags TokenFlags
}

func (*TemplateLiteralLikeBase) LiteralLikeData

func (node *TemplateLiteralLikeBase) LiteralLikeData() *LiteralLikeBase

func (*TemplateLiteralLikeBase) TemplateLiteralLikeData

func (node *TemplateLiteralLikeBase) TemplateLiteralLikeData() *TemplateLiteralLikeBase

type TemplateLiteralLikeNode

type TemplateLiteralLikeNode = Node // TemplateHead | TemplateMiddle | TemplateTail

type TemplateLiteralTypeNode

type TemplateLiteralTypeNode struct {
	TypeNodeBase
	Head          *TemplateHeadNode // TemplateHeadNode
	TemplateSpans *NodeList         // NodeList[*TemplateLiteralTypeSpanNode]
}

func (*TemplateLiteralTypeNode) Clone

func (node *TemplateLiteralTypeNode) Clone(f *NodeFactory) *Node

func (*TemplateLiteralTypeNode) ForEachChild

func (node *TemplateLiteralTypeNode) ForEachChild(v Visitor) bool

func (*TemplateLiteralTypeNode) VisitEachChild

func (node *TemplateLiteralTypeNode) VisitEachChild(v *NodeVisitor) *Node

type TemplateLiteralTypeSpan

type TemplateLiteralTypeSpan struct {
	NodeBase
	Type    *TypeNode             // TypeNode
	Literal *TemplateMiddleOrTail // TemplateMiddleOrTail
}

func (*TemplateLiteralTypeSpan) Clone

func (node *TemplateLiteralTypeSpan) Clone(f *NodeFactory) *Node

func (*TemplateLiteralTypeSpan) ForEachChild

func (node *TemplateLiteralTypeSpan) ForEachChild(v Visitor) bool

func (*TemplateLiteralTypeSpan) VisitEachChild

func (node *TemplateLiteralTypeSpan) VisitEachChild(v *NodeVisitor) *Node

type TemplateLiteralTypeSpanList

type TemplateLiteralTypeSpanList = NodeList // NodeList[*TemplateLiteralTypeSpan]

type TemplateLiteralTypeSpanNode

type TemplateLiteralTypeSpanNode = Node

type TemplateMiddle

type TemplateMiddle struct {
	NodeBase
	TemplateLiteralLikeBase
}

func (*TemplateMiddle) Clone

func (node *TemplateMiddle) Clone(f *NodeFactory) *Node

type TemplateMiddleNode

type TemplateMiddleNode = Node

type TemplateMiddleOrTail

type TemplateMiddleOrTail = Node // TemplateMiddle | TemplateTail

type TemplateSpan

type TemplateSpan struct {
	NodeBase
	Expression *Expression           // Expression
	Literal    *TemplateMiddleOrTail // TemplateMiddleOrTail
}

func (*TemplateSpan) Clone

func (node *TemplateSpan) Clone(f *NodeFactory) *Node

func (*TemplateSpan) ForEachChild

func (node *TemplateSpan) ForEachChild(v Visitor) bool

func (*TemplateSpan) VisitEachChild

func (node *TemplateSpan) VisitEachChild(v *NodeVisitor) *Node

type TemplateSpanList

type TemplateSpanList = NodeList // NodeList[*TemplateSpan]

type TemplateSpanNode

type TemplateSpanNode = Node

type TemplateTail

type TemplateTail struct {
	NodeBase
	TemplateLiteralLikeBase
}

func (*TemplateTail) Clone

func (node *TemplateTail) Clone(f *NodeFactory) *Node

type TemplateTailNode

type TemplateTailNode = Node

type ThisTypeNode

type ThisTypeNode struct {
	TypeNodeBase
}

func (*ThisTypeNode) Clone

func (node *ThisTypeNode) Clone(f *NodeFactory) *Node

type ThrowStatement

type ThrowStatement struct {
	StatementBase
	Expression *Expression // Expression
}

func (*ThrowStatement) Clone

func (node *ThrowStatement) Clone(f *NodeFactory) *Node

func (*ThrowStatement) ForEachChild

func (node *ThrowStatement) ForEachChild(v Visitor) bool

func (*ThrowStatement) VisitEachChild

func (node *ThrowStatement) VisitEachChild(v *NodeVisitor) *Node

type Token

type Token struct {
	NodeBase
}

func (*Token) Clone

func (node *Token) Clone(f *NodeFactory) *Node

type TokenFlags

type TokenFlags int32
const (
	TokenFlagsNone                           TokenFlags = 0
	TokenFlagsPrecedingLineBreak             TokenFlags = 1 << 0
	TokenFlagsPrecedingJSDocComment          TokenFlags = 1 << 1
	TokenFlagsUnterminated                   TokenFlags = 1 << 2
	TokenFlagsExtendedUnicodeEscape          TokenFlags = 1 << 3  // e.g. `\u{10ffff}`
	TokenFlagsScientific                     TokenFlags = 1 << 4  // e.g. `10e2`
	TokenFlagsOctal                          TokenFlags = 1 << 5  // e.g. `0777`
	TokenFlagsHexSpecifier                   TokenFlags = 1 << 6  // e.g. `0x00000000`
	TokenFlagsBinarySpecifier                TokenFlags = 1 << 7  // e.g. `0b0110010000000000`
	TokenFlagsOctalSpecifier                 TokenFlags = 1 << 8  // e.g. `0o777`
	TokenFlagsContainsSeparator              TokenFlags = 1 << 9  // e.g. `0b1100_0101`
	TokenFlagsUnicodeEscape                  TokenFlags = 1 << 10 // e.g. `\u00a0`
	TokenFlagsContainsInvalidEscape          TokenFlags = 1 << 11 // e.g. `\uhello`
	TokenFlagsHexEscape                      TokenFlags = 1 << 12 // e.g. `\xa0`
	TokenFlagsContainsLeadingZero            TokenFlags = 1 << 13 // e.g. `0888`
	TokenFlagsContainsInvalidSeparator       TokenFlags = 1 << 14 // e.g. `0_1`
	TokenFlagsPrecedingJSDocLeadingAsterisks TokenFlags = 1 << 15
	TokenFlagsSingleQuote                    TokenFlags = 1 << 16 // e.g. `'abc'`
	TokenFlagsBinaryOrOctalSpecifier         TokenFlags = TokenFlagsBinarySpecifier | TokenFlagsOctalSpecifier
	TokenFlagsWithSpecifier                  TokenFlags = TokenFlagsHexSpecifier | TokenFlagsBinaryOrOctalSpecifier
	TokenFlagsStringLiteralFlags             TokenFlags = TokenFlagsHexEscape | TokenFlagsUnicodeEscape | TokenFlagsExtendedUnicodeEscape | TokenFlagsContainsInvalidEscape | TokenFlagsSingleQuote
	TokenFlagsNumericLiteralFlags            TokenFlags = TokenFlagsScientific | TokenFlagsOctal | TokenFlagsContainsLeadingZero | TokenFlagsWithSpecifier | TokenFlagsContainsSeparator | TokenFlagsContainsInvalidSeparator
	TokenFlagsTemplateLiteralLikeFlags       TokenFlags = TokenFlagsHexEscape | TokenFlagsUnicodeEscape | TokenFlagsExtendedUnicodeEscape | TokenFlagsContainsInvalidEscape
	TokenFlagsIsInvalid                      TokenFlags = TokenFlagsOctal | TokenFlagsContainsLeadingZero | TokenFlagsContainsInvalidSeparator | TokenFlagsContainsInvalidEscape
)

type TokenNode

type TokenNode = Node

type TryStatement

type TryStatement struct {
	StatementBase
	TryBlock     *BlockNode       // BlockNode
	CatchClause  *CatchClauseNode // CatchClauseNode. Optional
	FinallyBlock *BlockNode       // BlockNode. Optional
}

func (*TryStatement) Clone

func (node *TryStatement) Clone(f *NodeFactory) *Node

func (*TryStatement) ForEachChild

func (node *TryStatement) ForEachChild(v Visitor) bool

func (*TryStatement) VisitEachChild

func (node *TryStatement) VisitEachChild(v *NodeVisitor) *Node

type TupleTypeNode

type TupleTypeNode struct {
	TypeNodeBase
	Elements *NodeList // NodeList[*TypeNode]
}

func (*TupleTypeNode) Clone

func (node *TupleTypeNode) Clone(f *NodeFactory) *Node

func (*TupleTypeNode) ForEachChild

func (node *TupleTypeNode) ForEachChild(v Visitor) bool

func (*TupleTypeNode) VisitEachChild

func (node *TupleTypeNode) VisitEachChild(v *NodeVisitor) *Node

type TypeAliasDeclaration

type TypeAliasDeclaration struct {
	StatementBase
	DeclarationBase
	ExportableBase
	ModifiersBase
	LocalsContainerBase

	TypeParameters *NodeList // NodeList[*TypeParameterDeclarationNode]. Optional
	Type           *TypeNode // TypeNode
	// contains filtered or unexported fields
}

func (*TypeAliasDeclaration) Clone

func (node *TypeAliasDeclaration) Clone(f *NodeFactory) *Node

func (*TypeAliasDeclaration) ForEachChild

func (node *TypeAliasDeclaration) ForEachChild(v Visitor) bool

func (*TypeAliasDeclaration) Name

func (node *TypeAliasDeclaration) Name() *DeclarationName

func (*TypeAliasDeclaration) VisitEachChild

func (node *TypeAliasDeclaration) VisitEachChild(v *NodeVisitor) *Node

type TypeArgumentList

type TypeArgumentList = NodeList // NodeList[*TypeNode]

type TypeAssertion

type TypeAssertion struct {
	ExpressionBase
	Type       *TypeNode   // TypeNode
	Expression *Expression // Expression
}

func (*TypeAssertion) Clone

func (node *TypeAssertion) Clone(f *NodeFactory) *Node

func (*TypeAssertion) ForEachChild

func (node *TypeAssertion) ForEachChild(v Visitor) bool

func (*TypeAssertion) VisitEachChild

func (node *TypeAssertion) VisitEachChild(v *NodeVisitor) *Node

type TypeElement

type TypeElement = Node // Node with TypeElementBase

type TypeElementBase

type TypeElementBase struct{}

type TypeElementList

type TypeElementList = NodeList // NodeList[*TypeElement]

type TypeList

type TypeList = NodeList // NodeList[*TypeNode]

type TypeLiteralNode

type TypeLiteralNode struct {
	TypeNodeBase
	DeclarationBase
	Members *NodeList // NodeList[*TypeElement]
}

func (*TypeLiteralNode) Clone

func (node *TypeLiteralNode) Clone(f *NodeFactory) *Node

func (*TypeLiteralNode) ForEachChild

func (node *TypeLiteralNode) ForEachChild(v Visitor) bool

func (*TypeLiteralNode) VisitEachChild

func (node *TypeLiteralNode) VisitEachChild(v *NodeVisitor) *Node

type TypeNode

type TypeNode = Node // Node with TypeNodeBase

type TypeNodeBase

type TypeNodeBase struct {
	NodeBase
}

type TypeOfExpression

type TypeOfExpression struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*TypeOfExpression) Clone

func (node *TypeOfExpression) Clone(f *NodeFactory) *Node

func (*TypeOfExpression) ForEachChild

func (node *TypeOfExpression) ForEachChild(v Visitor) bool

func (*TypeOfExpression) VisitEachChild

func (node *TypeOfExpression) VisitEachChild(v *NodeVisitor) *Node

type TypeOperatorNode

type TypeOperatorNode struct {
	TypeNodeBase
	Operator Kind      // KindKeyOfKeyword | KindUniqueKeyword | KindReadonlyKeyword
	Type     *TypeNode // TypeNode
}

func (*TypeOperatorNode) Clone

func (node *TypeOperatorNode) Clone(f *NodeFactory) *Node

func (*TypeOperatorNode) ForEachChild

func (node *TypeOperatorNode) ForEachChild(v Visitor) bool

func (*TypeOperatorNode) VisitEachChild

func (node *TypeOperatorNode) VisitEachChild(v *NodeVisitor) *Node

type TypeParameterDeclaration

type TypeParameterDeclaration struct {
	NodeBase
	DeclarationBase
	ModifiersBase

	Constraint  *TypeNode   // TypeNode. Optional
	DefaultType *TypeNode   // TypeNode. Optional
	Expression  *Expression // Expression. Optional, For error recovery purposes
	// contains filtered or unexported fields
}

func (*TypeParameterDeclaration) Clone

func (node *TypeParameterDeclaration) Clone(f *NodeFactory) *Node

func (*TypeParameterDeclaration) ForEachChild

func (node *TypeParameterDeclaration) ForEachChild(v Visitor) bool

func (*TypeParameterDeclaration) Name

func (*TypeParameterDeclaration) VisitEachChild

func (node *TypeParameterDeclaration) VisitEachChild(v *NodeVisitor) *Node

type TypeParameterDeclarationNode

type TypeParameterDeclarationNode = Node

type TypeParameterList

type TypeParameterList = NodeList // NodeList[*TypeParameterDeclaration]

type TypePrecedence

type TypePrecedence int32
const (
	// Conditional precedence (lowest)
	//
	//   Type[Extends]:
	//       ConditionalType[?Extends]
	//
	//   ConditionalType[Extends]:
	//       [~Extends] UnionType `extends` Type[+Extends] `?` Type[~Extends] `:` Type[~Extends]
	//
	TypePrecedenceConditional TypePrecedence = iota

	// Function precedence
	//
	//   Type[Extends]:
	//       ConditionalType[?Extends]
	//       FunctionType[?Extends]
	//       ConstructorType[?Extends]
	//
	//   ConditionalType[Extends]:
	//       UnionType
	//
	//   FunctionType[Extends]:
	//       TypeParameters? ArrowParameters `=>` Type[?Extends]
	//
	//   ConstructorType[Extends]:
	//       `abstract`? TypeParameters? ArrowParameters `=>` Type[?Extends]
	//
	TypePrecedenceFunction

	// Union precedence
	//
	//   UnionType:
	//       `|`? UnionTypeNoBar
	//
	//   UnionTypeNoBar:
	//       IntersectionType
	//       UnionTypeNoBar `|` IntersectionType
	//
	TypePrecedenceUnion

	// Intersection precedence
	//
	//   IntersectionType:
	//       `&`? IntersectionTypeNoAmpersand
	//
	//   IntersectionTypeNoAmpersand:
	//       TypeOperator
	//       IntersectionTypeNoAmpersand `&` TypeOperator
	//
	TypePrecedenceIntersection

	// TypeOperator precedence
	//
	//   TypeOperator:
	//     PostfixType
	//     InferType
	//     `keyof` TypeOperator
	//     `unique` TypeOperator
	//     `readonly` PostfixType
	//
	//   InferType:
	//     `infer` BindingIdentifier
	//     `infer` BindingIdentifier `extends` Type[+Extends]
	//
	TypePrecedenceTypeOperator

	// Postfix precedence
	//
	//   PostfixType:
	//       NonArrayType
	//       OptionalType
	//       ArrayType
	//       IndexedAccessType
	//
	//   OptionalType:
	//       PostfixType `?`
	//
	//   ArrayType:
	//       PostfixType `[` `]`
	//
	//   IndexedAccessType:
	//       PostfixType `[` Type[~Extends] `]`
	//
	TypePrecedencePostfix

	// NonArray precedence (highest)
	//
	//   NonArrayType:
	//       KeywordType
	//       LiteralType
	//       ThisType
	//       ImportType
	//       TypeQuery
	//       MappedType
	//       TypeLiteral
	//       TupleType
	//       ParenthesizedType
	//       TypePredicate
	//       TypeReference
	//       TemplateType
	//
	//   KeywordType: one of
	//       `any`       `unknown` `string`    `number` `bigint`
	//       `symbol`    `boolean` `undefined` `never`  `object`
	//       `intrinsic` `void`
	//
	//   LiteralType:
	//       StringLiteral
	//       NoSubstitutionTemplateLiteral
	//       NumericLiteral
	//       BigIntLiteral
	//       `-` NumericLiteral
	//       `-` BigIntLiteral
	//       `true`
	//       `false`
	//       `null`
	//
	//   ThisType:
	//       `this`
	//
	//   ImportType:
	//       `typeof`? `import` `(` Type[~Extends] `,`? `)` ImportTypeQualifier? TypeArguments?
	//       `typeof`? `import` `(` Type[~Extends] `,` ImportTypeAttributes `,`? `)` ImportTypeQualifier? TypeArguments?
	//
	//   ImportTypeQualifier:
	//       `.` EntityName
	//
	//   ImportTypeAttributes:
	//       `{` `with` `:` ImportAttributes `,`? `}`
	//
	//   TypeQuery:
	//
	//   MappedType:
	//       `{` MappedTypePrefix? MappedTypePropertyName MappedTypeSuffix? `:` Type[~Extends] `;` `}`
	//
	//   MappedTypePrefix:
	//       `readonly`
	//       `+` `readonly`
	//       `-` `readonly`
	//
	//   MappedTypePropertyName:
	//       `[` BindingIdentifier `in` Type[~Extends] `]`
	//       `[` BindingIdentifier `in` Type[~Extends] `as` Type[~Extends] `]`
	//
	//   MappedTypeSuffix:
	//       `?`
	//       `+` `?`
	//       `-` `?`
	//
	//   TypeLiteral:
	//       `{` TypeElementList `}`
	//
	//   TypeElementList:
	//       [empty]
	//       TypeElementList TypeElement
	//
	//   TypeElement:
	//       PropertySignature
	//       MethodSignature
	//       IndexSignature
	//       CallSignature
	//       ConstructSignature
	//
	//   PropertySignature:
	//       PropertyName `?`? TypeAnnotation? `;`
	//
	//   MethodSignature:
	//       PropertyName `?`? TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;`
	//       `get` PropertyName TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;` // GetAccessor
	//       `set` PropertyName TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;` // SetAccessor
	//
	//   IndexSignature:
	//       `[` IdentifierName`]` TypeAnnotation `;`
	//
	//   CallSignature:
	//       TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;`
	//
	//   ConstructSignature:
	//       `new` TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;`
	//
	//   TupleType:
	//       `[` `]`
	//       `[` NamedTupleElementTypes `,`? `]`
	//       `[` TupleElementTypes `,`? `]`
	//
	//   NamedTupleElementTypes:
	//       NamedTupleMember
	//       NamedTupleElementTypes `,` NamedTupleMember
	//
	//   NamedTupleMember:
	//       IdentifierName `?`? `:` Type[~Extends]
	//       `...` IdentifierName `:` Type[~Extends]
	//
	//   TupleElementTypes:
	//       TupleElementType
	//       TupleElementTypes `,` TupleElementType
	//
	//   TupleElementType:
	//       Type[~Extends]
	//       OptionalType
	//       RestType
	//
	//   RestType:
	//       `...` Type[~Extends]
	//
	//   ParenthesizedType:
	//       `(` Type[~Extends] `)`
	//
	//   TypePredicate:
	//       `asserts`? TypePredicateParameterName
	//       `asserts`? TypePredicateParameterName `is` Type[~Extends]
	//
	//   TypePredicateParameterName:
	//       `this`
	//       IdentifierReference
	//
	//   TypeReference:
	//       EntityName TypeArguments?
	//
	//   TemplateType:
	//       TemplateHead Type[~Extends] TemplateTypeSpans
	//
	//   TemplateTypeSpans:
	//       TemplateTail
	//       TemplateTypeMiddleList TemplateTail
	//
	//   TemplateTypeMiddleList:
	//       TemplateMiddle Type[~Extends]
	//       TemplateTypeMiddleList TemplateMiddle Type[~Extends]
	//
	//   TypeArguments:
	//       `<` TypeArgumentList `,`? `>`
	//
	//   TypeArgumentList:
	//       Type[~Extends]
	//       TypeArgumentList `,` Type[~Extends]
	//
	TypePrecedenceNonArray

	TypePrecedenceLowest  = TypePrecedenceConditional
	TypePrecedenceHighest = TypePrecedenceNonArray
)

func GetTypeNodePrecedence

func GetTypeNodePrecedence(n *TypeNode) TypePrecedence

Gets the precedence of a TypeNode

type TypePredicateNode

type TypePredicateNode struct {
	TypeNodeBase
	AssertsModifier *TokenNode                  // TokenNode. Optional
	ParameterName   *TypePredicateParameterName // TypePredicateParameterName (Identifier | ThisTypeNode)
	Type            *TypeNode                   // TypeNode. Optional
}

func (*TypePredicateNode) Clone

func (node *TypePredicateNode) Clone(f *NodeFactory) *Node

func (*TypePredicateNode) ForEachChild

func (node *TypePredicateNode) ForEachChild(v Visitor) bool

func (*TypePredicateNode) VisitEachChild

func (node *TypePredicateNode) VisitEachChild(v *NodeVisitor) *Node

type TypePredicateParameterName

type TypePredicateParameterName = Node // Identifier | ThisTypeNode

type TypeQueryNode

type TypeQueryNode struct {
	TypeNodeBase
	ExprName      *EntityName // EntityName
	TypeArguments *NodeList   // NodeList[*TypeNode]. Optional
}

func (*TypeQueryNode) Clone

func (node *TypeQueryNode) Clone(f *NodeFactory) *Node

func (*TypeQueryNode) ForEachChild

func (node *TypeQueryNode) ForEachChild(v Visitor) bool

func (*TypeQueryNode) VisitEachChild

func (node *TypeQueryNode) VisitEachChild(v *NodeVisitor) *Node

type TypeReferenceNode

type TypeReferenceNode struct {
	TypeNodeBase
	TypeName      *EntityName // EntityName
	TypeArguments *NodeList   // NodeList[*TypeNode]. Optional
}

func (*TypeReferenceNode) Clone

func (node *TypeReferenceNode) Clone(f *NodeFactory) *Node

func (*TypeReferenceNode) ForEachChild

func (node *TypeReferenceNode) ForEachChild(v Visitor) bool

func (*TypeReferenceNode) VisitEachChild

func (node *TypeReferenceNode) VisitEachChild(v *NodeVisitor) *Node

type UnionOrIntersectionTypeNode

type UnionOrIntersectionTypeNode = Node // UnionTypeNode | IntersectionTypeNode

type UnionOrIntersectionTypeNodeBase

type UnionOrIntersectionTypeNodeBase struct {
	TypeNodeBase
	Types *NodeList // NodeList[*TypeNode]
}

func (*UnionOrIntersectionTypeNodeBase) ForEachChild

func (node *UnionOrIntersectionTypeNodeBase) ForEachChild(v Visitor) bool

type UnionTypeNode

type UnionTypeNode struct {
	UnionOrIntersectionTypeNodeBase
}

func (*UnionTypeNode) Clone

func (node *UnionTypeNode) Clone(f *NodeFactory) *Node

func (*UnionTypeNode) VisitEachChild

func (node *UnionTypeNode) VisitEachChild(v *NodeVisitor) *Node

type VariableDeclaration

type VariableDeclaration struct {
	NodeBase
	DeclarationBase
	ExportableBase

	ExclamationToken *TokenNode  // TokenNode. Optional
	Type             *TypeNode   // TypeNode. Optional
	Initializer      *Expression // Expression. Optional
	// contains filtered or unexported fields
}

func (*VariableDeclaration) Clone

func (node *VariableDeclaration) Clone(f *NodeFactory) *Node

func (*VariableDeclaration) ForEachChild

func (node *VariableDeclaration) ForEachChild(v Visitor) bool

func (*VariableDeclaration) Name

func (node *VariableDeclaration) Name() *DeclarationName

func (*VariableDeclaration) VisitEachChild

func (node *VariableDeclaration) VisitEachChild(v *NodeVisitor) *Node

type VariableDeclarationList

type VariableDeclarationList struct {
	NodeBase
	Declarations *NodeList // NodeList[*VariableDeclarationNode]
}

func (*VariableDeclarationList) Clone

func (node *VariableDeclarationList) Clone(f *NodeFactory) *Node

func (*VariableDeclarationList) ForEachChild

func (node *VariableDeclarationList) ForEachChild(v Visitor) bool

func (*VariableDeclarationList) VisitEachChild

func (node *VariableDeclarationList) VisitEachChild(v *NodeVisitor) *Node

type VariableDeclarationListNode

type VariableDeclarationListNode = Node

type VariableDeclarationNode

type VariableDeclarationNode = Node

type VariableDeclarationNodeList

type VariableDeclarationNodeList = NodeList // NodeList[*VariableDeclaration]

type VariableStatement

type VariableStatement struct {
	StatementBase
	ModifiersBase
	DeclarationList *VariableDeclarationListNode // VariableDeclarationListNode
}

func (*VariableStatement) Clone

func (node *VariableStatement) Clone(f *NodeFactory) *Node

func (*VariableStatement) ForEachChild

func (node *VariableStatement) ForEachChild(v Visitor) bool

func (*VariableStatement) VisitEachChild

func (node *VariableStatement) VisitEachChild(v *NodeVisitor) *Node

type Visitor

type Visitor func(*Node) bool

type VoidExpression

type VoidExpression struct {
	ExpressionBase
	Expression *Expression // Expression
}

func (*VoidExpression) Clone

func (node *VoidExpression) Clone(f *NodeFactory) *Node

func (*VoidExpression) ForEachChild

func (node *VoidExpression) ForEachChild(v Visitor) bool

func (*VoidExpression) VisitEachChild

func (node *VoidExpression) VisitEachChild(v *NodeVisitor) *Node

type WhileStatement

type WhileStatement struct {
	StatementBase
	Expression *Expression // Expression
	Statement  *Statement  // Statement
}

func (*WhileStatement) Clone

func (node *WhileStatement) Clone(f *NodeFactory) *Node

func (*WhileStatement) ForEachChild

func (node *WhileStatement) ForEachChild(v Visitor) bool

func (*WhileStatement) VisitEachChild

func (node *WhileStatement) VisitEachChild(v *NodeVisitor) *Node

type WithStatement

type WithStatement struct {
	StatementBase
	Expression *Expression // Expression
	Statement  *Statement  // Statement
}

func (*WithStatement) Clone

func (node *WithStatement) Clone(f *NodeFactory) *Node

func (*WithStatement) ForEachChild

func (node *WithStatement) ForEachChild(v Visitor) bool

func (*WithStatement) VisitEachChild

func (node *WithStatement) VisitEachChild(v *NodeVisitor) *Node

type YieldExpression

type YieldExpression struct {
	ExpressionBase
	AsteriskToken *TokenNode  // TokenNode
	Expression    *Expression // Expression. Optional
}

func (*YieldExpression) Clone

func (node *YieldExpression) Clone(f *NodeFactory) *Node

func (*YieldExpression) ForEachChild

func (node *YieldExpression) ForEachChild(v Visitor) bool

func (*YieldExpression) VisitEachChild

func (node *YieldExpression) VisitEachChild(v *NodeVisitor) *Node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL