ast

package
v0.0.0-...-0442f87 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 13 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 (declare keyword)
	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
	// JSDoc-only modifiers
	ModifierFlagsDeprecated ModifierFlags = 1 << 16 // Deprecated tag
	// 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
	ModifierFlagsSyntacticModifiers        = ModifierFlagsSyntacticOrJSDocModifiers | ModifierFlagsSyntacticOnlyModifiers
	ModifierFlagsJSDocCacheOnlyModifiers   = ModifierFlagsJSDocPublic | ModifierFlagsJSDocPrivate | ModifierFlagsJSDocProtected | ModifierFlagsJSDocReadonly | ModifierFlagsJSDocOverride
	ModifierFlagsJSDocOnlyModifiers        = ModifierFlagsDeprecated
	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
	ModifierFlagsExportDefault      = ModifierFlagsExport | ModifierFlagsDefault
	ModifierFlagsAll                = ModifierFlagsExport | ModifierFlagsAmbient | ModifierFlagsPublic | ModifierFlagsPrivate | ModifierFlagsProtected | ModifierFlagsStatic | ModifierFlagsReadonly | ModifierFlagsAbstract | ModifierFlagsAccessor | ModifierFlagsAsync | ModifierFlagsDefault | ModifierFlagsConst | ModifierFlagsDeprecated | ModifierFlagsOverride | ModifierFlagsIn | ModifierFlagsOut | ModifierFlagsDecorator
	ModifierFlagsModifier           = ModifierFlagsAll & ^ModifierFlagsDecorator
	ModifierFlagsJavaScript         = ModifierFlagsExport | ModifierFlagsStatic | ModifierFlagsAccessor | ModifierFlagsAsync | ModifierFlagsDefault
)
View Source
const (
	SubtreeContainsTypeScript SubtreeFacts = 1 << iota
	SubtreeContainsJsx
	SubtreeContainsESDecorators
	SubtreeContainsUsing
	SubtreeContainsClassStaticBlocks
	SubtreeContainsESClassFields
	SubtreeContainsLogicalAssignments
	SubtreeContainsNullishCoalescing
	SubtreeContainsOptionalChaining
	SubtreeContainsMissingCatchClauseVariable
	SubtreeContainsESObjectRestOrSpread // subtree has a `...` somewhere inside it, never cleared
	SubtreeContainsForAwaitOrAsyncGenerator
	SubtreeContainsAnyAwait
	SubtreeContainsExponentiationOperator

	SubtreeContainsLexicalThis
	SubtreeContainsLexicalSuper
	SubtreeContainsRestOrSpread       // marker on any `...` - cleared on binding pattern exit
	SubtreeContainsObjectRestOrSpread // marker on any `{...x}` - cleared on most scope exits
	SubtreeContainsAwait
	SubtreeContainsDynamicImport
	SubtreeContainsClassFields
	SubtreeContainsDecorators
	SubtreeContainsIdentifier

	SubtreeFactsComputed              // NOTE: This should always be last
	SubtreeFactsNone     SubtreeFacts = 0

	SubtreeContainsESNext = SubtreeContainsESDecorators | SubtreeContainsUsing
	SubtreeContainsES2022 = SubtreeContainsClassStaticBlocks | SubtreeContainsESClassFields
	SubtreeContainsES2021 = SubtreeContainsLogicalAssignments
	SubtreeContainsES2020 = SubtreeContainsNullishCoalescing | SubtreeContainsOptionalChaining
	SubtreeContainsES2019 = SubtreeContainsMissingCatchClauseVariable
	SubtreeContainsES2018 = SubtreeContainsESObjectRestOrSpread | SubtreeContainsForAwaitOrAsyncGenerator
	SubtreeContainsES2017 = SubtreeContainsAnyAwait
	SubtreeContainsES2016 = SubtreeContainsExponentiationOperator

	SubtreeExclusionsNode                    = SubtreeFactsComputed
	SubtreeExclusionsEraseable               = ^SubtreeContainsTypeScript
	SubtreeExclusionsOuterExpression         = SubtreeExclusionsNode
	SubtreeExclusionsPropertyAccess          = SubtreeExclusionsNode
	SubtreeExclusionsElementAccess           = SubtreeExclusionsNode
	SubtreeExclusionsArrowFunction           = SubtreeExclusionsNode | SubtreeContainsAwait | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsFunction                = SubtreeExclusionsNode | SubtreeContainsLexicalThis | SubtreeContainsLexicalSuper | SubtreeContainsAwait | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsConstructor             = SubtreeExclusionsNode | SubtreeContainsLexicalThis | SubtreeContainsLexicalSuper | SubtreeContainsAwait | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsMethod                  = SubtreeExclusionsNode | SubtreeContainsLexicalThis | SubtreeContainsLexicalSuper | SubtreeContainsAwait | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsAccessor                = SubtreeExclusionsNode | SubtreeContainsLexicalThis | SubtreeContainsLexicalSuper | SubtreeContainsAwait | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsProperty                = SubtreeExclusionsNode | SubtreeContainsLexicalThis | SubtreeContainsLexicalSuper
	SubtreeExclusionsClass                   = SubtreeExclusionsNode
	SubtreeExclusionsModule                  = SubtreeExclusionsNode | SubtreeContainsLexicalThis | SubtreeContainsLexicalSuper
	SubtreeExclusionsObjectLiteral           = SubtreeExclusionsNode | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsArrayLiteral            = SubtreeExclusionsNode
	SubtreeExclusionsCall                    = SubtreeExclusionsNode
	SubtreeExclusionsNew                     = SubtreeExclusionsNode
	SubtreeExclusionsVariableDeclarationList = SubtreeExclusionsNode | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsParameter               = SubtreeExclusionsNode
	SubtreeExclusionsCatchClause             = SubtreeExclusionsNode | SubtreeContainsObjectRestOrSpread
	SubtreeExclusionsBindingPattern          = SubtreeExclusionsNode | SubtreeContainsRestOrSpread

	SubtreeContainsLexicalThisOrSuper = SubtreeContainsLexicalThis | SubtreeContainsLexicalSuper
)
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"
	InternalSymbolNameModuleExports           = "module.exports"
)
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
	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 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 CanHaveSymbol

func CanHaveSymbol(node *Node) bool

func CompareDiagnostics

func CompareDiagnostics(d1, d2 *Diagnostic) int

func ContainsObjectRestOrSpread

func ContainsObjectRestOrSpread(node *Node) bool

*

  • Walk an AssignmentPattern to determine if it contains object rest (`...`) syntax. We cannot rely on
  • propagation of `TransformFlags.ContainsObjectRestOrSpread` since it isn't propagated by default in
  • ObjectLiteralExpression and ArrayLiteralExpression since we do not know whether they belong to an
  • AssignmentPattern at the time the nodes are parsed.

func EqualDiagnostics

func EqualDiagnostics(d1, d2 *Diagnostic) bool

func EqualDiagnosticsNoRelatedInfo

func EqualDiagnosticsNoRelatedInfo(d1, d2 *Diagnostic) bool

func ExportAssignmentIsAlias

func ExportAssignmentIsAlias(node *Node) bool

func ForEachChildAndJSDoc

func ForEachChildAndJSDoc(node *Node, sourceFile *SourceFile, v Visitor) 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 GetEmitModuleFormatOfFileWorker

func GetEmitModuleFormatOfFileWorker(fileName string, options *core.CompilerOptions, sourceFileMetaData SourceFileMetaData) core.ModuleKind

func GetImpliedNodeFormatForEmitWorker

func GetImpliedNodeFormatForEmitWorker(fileName string, emitModuleKind core.ModuleKind, sourceFileMetaData SourceFileMetaData) core.ResolutionMode

func GetImpliedNodeFormatForFile

func GetImpliedNodeFormatForFile(path string, packageJsonType string) core.ModuleKind

func GetJSXImplicitImportBase

func GetJSXImplicitImportBase(compilerOptions *core.CompilerOptions, file *SourceFile) string

func GetJSXRuntimeImport

func GetJSXRuntimeImport(base string, options *core.CompilerOptions) string

func GetPragmaArgument

func GetPragmaArgument(pragma *Pragma, name string) string

func GetPropertyNameForPropertyNameNode

func GetPropertyNameForPropertyNameNode(name *Node) string

func GetSourceFileAffectingCompilerOptions

func GetSourceFileAffectingCompilerOptions(fileName string, options *core.CompilerOptions) core.SourceFileAffectingCompilerOptions

func GetTextOfPropertyName

func GetTextOfPropertyName(name *Node) string

func HasAccessorModifier

func HasAccessorModifier(node *Node) bool

func HasDecorators

func HasDecorators(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 HasInitializer

func HasInitializer(node *Node) bool

func HasQuestionToken

func HasQuestionToken(node *Node) bool

func HasResolutionModeOverride

func HasResolutionModeOverride(node *Node) bool

func HasSamePropertyAccessName

func HasSamePropertyAccessName(node1, node2 *Node) bool

func HasStaticModifier

func HasStaticModifier(node *Node) bool

func HasSyntacticModifier

func HasSyntacticModifier(node *Node, flags ModifierFlags) bool

func IndexOfNode

func IndexOfNode(nodes []*Node, node *Node) int

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> = ...
const <symbol> = ... (JS only)
const { <symbol>, ... } = ... (JS only)
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>
module.exports = <EntityNameExpression> (JS only)

func IsAmbientModule

func IsAmbientModule(node *Node) bool

func IsAnyExportAssignment

func IsAnyExportAssignment(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 IsArrayLiteralOrObjectLiteralDestructuringPattern

func IsArrayLiteralOrObjectLiteralDestructuringPattern(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 IsAssignmentPattern

func IsAssignmentPattern(node *Node) 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 IsBindableStaticAccessExpression

func IsBindableStaticAccessExpression(node *Node, excludeThisKeyword bool) bool

func IsBindableStaticElementAccessExpression

func IsBindableStaticElementAccessExpression(node *Node, excludeThisKeyword bool) bool

func IsBindableStaticNameExpression

func IsBindableStaticNameExpression(node *Node, excludeThisKeyword bool) 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 IsCallLikeExpression

func IsCallLikeExpression(node *Node) bool

func IsCallLikeOrFunctionLikeExpression

func IsCallLikeOrFunctionLikeExpression(node *Node) bool

func IsCallOrNewExpression

func IsCallOrNewExpression(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 IsCheckJSEnabledForFile

func IsCheckJSEnabledForFile(sourceFile *SourceFile, compilerOptions *core.CompilerOptions) 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 IsClassMemberModifier

func IsClassMemberModifier(token Kind) bool

func IsClassOrInterfaceLike

func IsClassOrInterfaceLike(node *Node) bool

func IsClassOrTypeElement

func IsClassOrTypeElement(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 IsCommonJSExport

func IsCommonJSExport(node *Node) bool

func IsComputedNonLiteralName

func IsComputedNonLiteralName(name *Node) bool

func IsComputedPropertyName

func IsComputedPropertyName(node *Node) bool

func IsConditionalExpression

func IsConditionalExpression(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 IsContextualKeyword

func IsContextualKeyword(token Kind) bool

func IsDeclaration

func IsDeclaration(node *Node) bool

func IsDeclarationBindingElement

func IsDeclarationBindingElement(bindingElement *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 IsElementAccessExpression

func IsElementAccessExpression(node *Node) bool

func IsEmittableImport

func IsEmittableImport(node *Node) bool

func IsEmptyArrayLiteral

func IsEmptyArrayLiteral(expression *Node) bool

func IsEmptyObjectLiteral

func IsEmptyObjectLiteral(expression *Node) bool

func IsEmptyStatement

func IsEmptyStatement(node *Node) bool

func IsEntityName

func IsEntityName(node *Node) bool

func IsEntityNameExpression

func IsEntityNameExpression(node *Node) bool

func IsEntityNameExpressionEx

func IsEntityNameExpressionEx(node *Node, allowJS bool) bool

func IsEnumConst

func IsEnumConst(node *Node) bool

func IsEnumDeclaration

func IsEnumDeclaration(node *Node) bool

func IsEnumMember

func IsEnumMember(node *Node) bool

func IsExclusivelyTypeOnlyImportOrExport

func IsExclusivelyTypeOnlyImportOrExport(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 IsExternalModuleAugmentation

func IsExternalModuleAugmentation(node *Node) 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 IsFunctionLikeKind

func IsFunctionLikeKind(kind Kind) bool

func IsFunctionLikeOrClassStaticBlockDeclaration

func IsFunctionLikeOrClassStaticBlockDeclaration(node *Node) bool

func IsFunctionOrModuleBlock

func IsFunctionOrModuleBlock(node *Node) bool

func IsFunctionOrSourceFile

func IsFunctionOrSourceFile(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 IsIfStatement

func IsIfStatement(node *Node) bool

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 IsImportDeclarationOrJSImportDeclaration

func IsImportDeclarationOrJSImportDeclaration(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 IsImportOrImportEqualsDeclaration

func IsImportOrImportEqualsDeclaration(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 IsInJsonFile

func IsInJsonFile(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 IsInitializedProperty

func IsInitializedProperty(member *ClassElement) bool

Gets a value indicating whether a class element is either a static or an instance property declaration with an initializer.

func IsInstanceOfExpression

func IsInstanceOfExpression(node *Node) bool

func IsInterfaceDeclaration

func IsInterfaceDeclaration(node *Node) bool

func IsInternalModuleImportEqualsDeclaration

func IsInternalModuleImportEqualsDeclaration(node *Node) bool

func IsIntersectionTypeNode

func IsIntersectionTypeNode(node *Node) bool

func IsIterationStatement

func IsIterationStatement(node *Node, lookInLabeledStatements bool) bool

func IsJSDocAugmentsTag

func IsJSDocAugmentsTag(node *Node) bool

func IsJSDocCallbackTag

func IsJSDocCallbackTag(node *Node) bool

func IsJSDocDeprecatedTag

func IsJSDocDeprecatedTag(node *Node) bool

func IsJSDocImplementsTag

func IsJSDocImplementsTag(node *Node) bool

func IsJSDocImportTag

func IsJSDocImportTag(node *Node) bool

func IsJSDocKind

func IsJSDocKind(kind Kind) bool

func IsJSDocLinkLike

func IsJSDocLinkLike(node *Node) bool

func IsJSDocNameReference

func IsJSDocNameReference(node *Node) bool

func IsJSDocNameReferenceContext

func IsJSDocNameReferenceContext(node *Node) bool

func IsJSDocNode

func IsJSDocNode(node *Node) bool

func IsJSDocNonNullableType

func IsJSDocNonNullableType(node *Node) bool

func IsJSDocNullableType

func IsJSDocNullableType(node *Node) bool

func IsJSDocParameterTag

func IsJSDocParameterTag(node *Node) bool

func IsJSDocPropertyTag

func IsJSDocPropertyTag(node *Node) bool

func IsJSDocReturnTag

func IsJSDocReturnTag(node *Node) bool

func IsJSDocSignature

func IsJSDocSignature(node *Node) bool

func IsJSDocSingleCommentNode

func IsJSDocSingleCommentNode(node *Node) bool

In Strada, if a JSDoc node has a single comment, that comment is represented as a string property as a simplification, and therefore that comment is not visited by `forEachChild`.

func IsJSDocSingleCommentNodeComment

func IsJSDocSingleCommentNodeComment(node *Node) bool

See `IsJSDocSingleCommentNode`.

func IsJSDocSingleCommentNodeList

func IsJSDocSingleCommentNodeList(nodeList *NodeList) bool

See `IsJSDocSingleCommentNode`.

func IsJSDocTag

func IsJSDocTag(node *Node) bool

func IsJSDocTemplateTag

func IsJSDocTemplateTag(n *Node) bool

func IsJSDocTypeTag

func IsJSDocTypeTag(node *Node) bool

func IsJSDocTypedefTag

func IsJSDocTypedefTag(node *Node) bool

func IsJSDocUnknownTag

func IsJSDocUnknownTag(node *Node) bool

func IsJSExportAssignment

func IsJSExportAssignment(node *Node) bool

func IsJSTypeAliasDeclaration

func IsJSTypeAliasDeclaration(node *Node) bool

func IsJsonSourceFile

func IsJsonSourceFile(file *SourceFile) bool

func IsJsxAttribute

func IsJsxAttribute(node *Node) bool

func IsJsxAttributeLike

func IsJsxAttributeLike(node *Node) bool

func IsJsxAttributes

func IsJsxAttributes(node *Node) bool

func IsJsxCallLike

func IsJsxCallLike(node *Node) bool

func IsJsxChild

func IsJsxChild(node *Node) bool

func IsJsxClosingElement

func IsJsxClosingElement(node *Node) bool

func IsJsxElement

func IsJsxElement(node *Node) bool

func IsJsxExpression

func IsJsxExpression(node *Node) bool

func IsJsxFragment

func IsJsxFragment(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 IsJsxOpeningLikeElement

func IsJsxOpeningLikeElement(node *Node) bool

func IsJsxSelfClosingElement

func IsJsxSelfClosingElement(node *Node) bool

func IsJsxSpreadAttribute

func IsJsxSpreadAttribute(node *Node) bool

func IsJsxTagName

func IsJsxTagName(node *Node) bool

func IsJsxText

func IsJsxText(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 IsLateVisibilityPaintedStatement

func IsLateVisibilityPaintedStatement(node *Node) bool

func IsLeftHandSideExpression

func IsLeftHandSideExpression(node *Node) bool

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

func IsLet

func IsLet(node *Node) bool

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

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 IsLiteralLikeElementAccess

func IsLiteralLikeElementAccess(node *Node) 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 IsModifierLike

func IsModifierLike(node *Node) bool

func IsModuleAugmentationExternal

func IsModuleAugmentationExternal(node *Node) bool

func IsModuleBlock

func IsModuleBlock(node *Node) bool

func IsModuleDeclaration

func IsModuleDeclaration(node *Node) bool

func IsModuleExportsAccessExpression

func IsModuleExportsAccessExpression(node *Node) bool

func IsModuleIdentifier

func IsModuleIdentifier(node *Node) bool

func IsModuleOrEnumDeclaration

func IsModuleOrEnumDeclaration(node *Node) bool

func IsModuleWithStringLiteralName

func IsModuleWithStringLiteralName(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 IsNotEmittedStatement

func IsNotEmittedStatement(node *Node) bool

func IsNotEmittedTypeElement

func IsNotEmittedTypeElement(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 IsObjectTypeDeclaration

func IsObjectTypeDeclaration(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 IsParameterLike

func IsParameterLike(node *Node) bool

func IsParameterPropertyDeclaration

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

func IsParameterPropertyModifier

func IsParameterPropertyModifier(kind Kind) bool

func IsParenthesizedExpression

func IsParenthesizedExpression(node *Node) bool

func IsParenthesizedTypeNode

func IsParenthesizedTypeNode(node *Node) bool

func IsParseTreeNode

func IsParseTreeNode(node *Node) bool

func IsPartOfExclusivelyTypeOnlyImportOrExportDeclaration

func IsPartOfExclusivelyTypeOnlyImportOrExportDeclaration(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 IsPartOfTypeOnlyImportOrExportDeclaration

func IsPartOfTypeOnlyImportOrExportDeclaration(node *Node) bool

func IsPartOfTypeQuery

func IsPartOfTypeQuery(node *Node) bool

func IsPartiallyEmittedExpression

func IsPartiallyEmittedExpression(node *Node) bool

func IsPlainJSFile

func IsPlainJSFile(file *SourceFile, checkJs core.Tristate) 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 IsPropertyAccessEntityNameExpression

func IsPropertyAccessEntityNameExpression(node *Node, allowJS bool) 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 IsRegularExpressionLiteral

func IsRegularExpressionLiteral(node *Node) bool

func IsRequireCall

func IsRequireCall(node *Node, requireStringLiteralLikeArgument bool) bool

Returns true if the node is a CallExpression to the identifier 'require' with exactly one argument (of the form 'require("name")'). This function does not test if the node is in a JavaScript file or not.

func IsRequireVariableStatement

func IsRequireVariableStatement(node *Node) bool

func IsResolutionModeOverrideHost

func IsResolutionModeOverrideHost(node *Node) bool

func IsRestTypeNode

func IsRestTypeNode(node *Node) bool

func IsReturnStatement

func IsReturnStatement(node *Node) bool

func IsRightSideOfQualifiedNameOrPropertyAccess

func IsRightSideOfQualifiedNameOrPropertyAccess(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 IsSourceFileJS

func IsSourceFileJS(file *SourceFile) 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 IsStringTextContainingNode

func IsStringTextContainingNode(node *Node) bool

func IsSuperCall

func IsSuperCall(node *Node) bool

func IsSwitchStatement

func IsSwitchStatement(node *Node) bool

func IsSyntheticExpression

func IsSyntheticExpression(node *Node) bool

func IsSyntheticReferenceExpression

func IsSyntheticReferenceExpression(node *Node) bool

func IsTaggedTemplateExpression

func IsTaggedTemplateExpression(node *Node) bool

func IsTemplateExpression

func IsTemplateExpression(node *Node) bool

func IsTemplateLiteralKind

func IsTemplateLiteralKind(kind Kind) bool

func IsTemplateLiteralToken

func IsTemplateLiteralToken(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 IsThisInTypeQuery

func IsThisInTypeQuery(node *Node) bool

func IsThisParameter

func IsThisParameter(node *Node) bool

func IsThisTypeNode

func IsThisTypeNode(node *Node) bool

func IsThrowStatement

func IsThrowStatement(node *Node) bool

func IsTokenKind

func IsTokenKind(token Kind) bool

func IsTrivia

func IsTrivia(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 IsTypeDeclaration

func IsTypeDeclaration(node *Node) bool

func IsTypeDeclarationName

func IsTypeDeclarationName(name *Node) bool

func IsTypeElement

func IsTypeElement(node *Node) bool

func IsTypeKeywordToken

func IsTypeKeywordToken(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 IsTypeOnlyImportDeclaration

func IsTypeOnlyImportDeclaration(node *Node) bool

func IsTypeOnlyImportOrExportDeclaration

func IsTypeOnlyImportOrExportDeclaration(node *Node) bool

func IsTypeOperatorNode

func IsTypeOperatorNode(node *Node) bool

func IsTypeOrJSTypeAliasDeclaration

func IsTypeOrJSTypeAliasDeclaration(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 IsTypeReferenceType

func IsTypeReferenceType(node *Node) bool

func IsUnaryExpression

func IsUnaryExpression(node *Node) bool

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

func IsUnterminatedLiteral

func IsUnterminatedLiteral(node *Node) bool

func IsValidTypeOnlyAliasUseSite

func IsValidTypeOnlyAliasUseSite(useSite *Node) bool

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 IsVariableDeclarationInitializedToRequire

func IsVariableDeclarationInitializedToRequire(node *Node) bool

Of the form: `const x = require("x")` or `const { x } = require("x")` or with `var` or `let` The variable must not be exported and must not have a type annotation, even a jsdoc one. The initializer must be a call to `require` with a string literal or a string literal-like argument.

func IsVariableDeclarationList

func IsVariableDeclarationList(node *Node) bool

func IsVariableLike

func IsVariableLike(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 IsWriteAccess

func IsWriteAccess(node *Node) bool

func IsWriteAccessForReference

func IsWriteAccessForReference(node *Node) bool

func IsWriteOnlyAccess

func IsWriteOnlyAccess(node *Node) bool

func IsYieldExpression

func IsYieldExpression(node *Node) bool

func ModuleExportNameIsDefault

func ModuleExportNameIsDefault(node *Node) bool

func NodeHasKind

func NodeHasKind(node *Node, kind Kind) 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 RangeIsSynthesized

func RangeIsSynthesized(loc core.TextRange) bool

func SetExternalModuleIndicator

func SetExternalModuleIndicator(file *SourceFile, opts ExternalModuleIndicatorOptions)

func SetImportsOfSourceFile

func SetImportsOfSourceFile(node *SourceFile, imports []*LiteralLikeNode)

This should never be called outside the parser

func SetParentInChildren

func SetParentInChildren(node *Node)

func ShouldTransformImportCall

func ShouldTransformImportCall(fileName string, options *core.CompilerOptions, impliedNodeFormatForEmit core.ModuleKind) bool

func SymbolName

func SymbolName(symbol *Symbol) string

func TryGetTextOfPropertyName

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

Types

type AccessExpression

type AccessExpression = Node // PropertyAccessExpression | ElementAccessExpression

type AccessKind

type AccessKind int32
const (
	AccessKindRead      AccessKind = iota // Only reads from a variable
	AccessKindWrite                       // Only writes to a variable without ever reading it. E.g.: `x=1;`.
	AccessKindReadWrite                   // Reads from and writes to a variable. E.g.: `f(x++);`, `x/=1`.
)

type AccessorDeclaration

type AccessorDeclaration = Node // GetAccessorDeclaration | SetAccessorDeclaration

type AccessorDeclarationBase

type AccessorDeclarationBase struct {
	NodeBase
	NamedMemberBase
	FunctionLikeWithBodyBase
	FlowNodeBase
	TypeElementBase
	ClassElementBase
	ObjectLiteralElementBase
	// contains filtered or unexported fields
}

func (*AccessorDeclarationBase) ForEachChild

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

func (*AccessorDeclarationBase) IsAccessorDeclaration

func (node *AccessorDeclarationBase) IsAccessorDeclaration()

type AnyValidImportOrReExport

type AnyValidImportOrReExport = Node // (ImportDeclaration | ExportDeclaration | JSDocImportTag) & { moduleSpecifier: StringLiteral } | ImportEqualsDeclaration & { moduleReference: ExternalModuleReference & { expression: StringLiteral }} | RequireOrImportCall | ValidImportTypeNode

type ArgumentList

type ArgumentList = NodeList // NodeList[*Expression]

type ArrayLiteralExpression

type ArrayLiteralExpression struct {
	ExpressionBase

	Elements  *NodeList // NodeList[*Expression]
	MultiLine bool
	// contains filtered or unexported fields
}

func (*ArrayLiteralExpression) Clone

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 NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*ArrowFunction) Clone

func (node *ArrowFunction) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

type BinaryExpression

type BinaryExpression struct {
	ExpressionBase
	DeclarationBase
	ModifiersBase

	Left          *Expression // Expression
	Type          *TypeNode   // TypeNode. Only set by JSDoc @type tags.
	OperatorToken *TokenNode  // TokenNode
	Right         *Expression // Expression
	// contains filtered or unexported fields
}

func (*BinaryExpression) Clone

func (node *BinaryExpression) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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]
	// contains filtered or unexported fields
}

func (*BindingPattern) Clone

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

func (*BindingPattern) ForEachChild

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

func (*BindingPattern) VisitEachChild

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

type BindingPatternNode

type BindingPatternNode = Node

type Block

type Block struct {
	StatementBase
	LocalsContainerBase

	Statements *NodeList // NodeList[*Statement]
	Multiline  bool
	// contains filtered or unexported fields
}

func (*Block) Clone

func (node *Block) Clone(f NodeFactoryCoercible) *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 BreakOrContinueStatement

type BreakOrContinueStatement = Node // BreakStatement | ContinueStatement

type BreakStatement

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

func (*BreakStatement) Clone

func (node *BreakStatement) Clone(f NodeFactoryCoercible) *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]
	// contains filtered or unexported fields
}

func (*CallExpression) Clone

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

func (*CallExpression) ForEachChild

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

func (*CallExpression) VisitEachChild

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

type CallLikeExpression

type CallLikeExpression = Node // CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxCallLike | InstanceofExpression

type CallSignatureDeclaration

type CallSignatureDeclaration struct {
	NodeBase
	DeclarationBase
	FunctionLikeBase
	TypeElementBase
	// contains filtered or unexported fields
}

func (*CallSignatureDeclaration) Clone

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]
	// contains filtered or unexported fields
}

func (*CaseBlock) Clone

func (node *CaseBlock) Clone(f NodeFactoryCoercible) *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 CaseClauseNode

type CaseClauseNode = 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
	// contains filtered or unexported fields
}

func (*CaseOrDefaultClause) Clone

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
	// contains filtered or unexported fields
}

func (*CatchClause) Clone

func (node *CatchClause) Clone(f NodeFactoryCoercible) *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 CheckJsDirective

type CheckJsDirective struct {
	Enabled bool
	Range   CommentRange
}

type ClassDeclaration

type ClassDeclaration struct {
	StatementBase
	ClassLikeBase
}

func (*ClassDeclaration) Clone

func (node *ClassDeclaration) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

func (*ClassExpression) VisitEachChild

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

type ClassLikeBase

type ClassLikeBase struct {
	DeclarationBase
	ExportableBase
	ModifiersBase
	LocalsContainerBase

	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
	// contains filtered or unexported fields
}

func (*ClassStaticBlockDeclaration) Clone

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
	Kind               Kind
	HasTrailingNewLine bool
}

type CommonJSExport

type CommonJSExport struct {
	StatementBase
	DeclarationBase
	ExportableBase
	ModifiersBase

	Type        *TypeNode
	Initializer *Expression
	// contains filtered or unexported fields
}

func (*CommonJSExport) Clone

func (node *CommonJSExport) Clone(f NodeFactoryCoercible) *Node

func (*CommonJSExport) ForEachChild

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

func (*CommonJSExport) Name

func (node *CommonJSExport) Name() *DeclarationName

func (*CommonJSExport) VisitEachChild

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

type ComputedPropertyName

type ComputedPropertyName struct {
	NodeBase

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

func (*ComputedPropertyName) Clone

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
	// contains filtered or unexported fields
}

func (*ConditionalExpression) Clone

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 (*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
	// contains filtered or unexported fields
}

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
	// contains filtered or unexported fields
}

func (*ConstructorDeclaration) Clone

func (*ConstructorDeclaration) ForEachChild

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

func (*ConstructorDeclaration) VisitEachChild

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

type ConstructorDeclarationNode

type ConstructorDeclarationNode = Node

type ConstructorTypeNode

type ConstructorTypeNode struct {
	FunctionOrConstructorTypeNodeBase
}

func (*ConstructorTypeNode) Clone

func (*ConstructorTypeNode) VisitEachChild

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

type ContinueStatement

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

func (*ContinueStatement) Clone

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

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
	// contains filtered or unexported fields
}

func (*Decorator) Clone

func (node *Decorator) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NewDiagnosticWith

func NewDiagnosticWith(
	file *SourceFile,
	loc core.TextRange,
	code int32,
	category diagnostics.Category,
	message string,
	messageChain []*Diagnostic,
	relatedInformation []*Diagnostic,
	reportsUnnecessary bool,
	reportsDeprecated bool,
	skippedOnNoEmit bool,
) *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) Clone

func (d *Diagnostic) Clone() *Diagnostic

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) ReportsDeprecated

func (d *Diagnostic) ReportsDeprecated() bool

func (*Diagnostic) ReportsUnnecessary

func (d *Diagnostic) ReportsUnnecessary() bool

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

func (*Diagnostic) SetSkippedOnNoEmit

func (d *Diagnostic) SetSkippedOnNoEmit()

func (*Diagnostic) SkippedOnNoEmit

func (d *Diagnostic) SkippedOnNoEmit() bool

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
	// contains filtered or unexported fields
}

func (*DoStatement) Clone

func (node *DoStatement) Clone(f NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*ElementAccessExpression) Clone

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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*EnumMember) Clone

func (node *EnumMember) Clone(f NodeFactoryCoercible) *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
	Type           *TypeNode   // TypeNode. Only set by JSDoc @type tags.
	Expression     *Expression // Expression
	// contains filtered or unexported fields
}

This is either an `export =` or an `export default` declaration. Unless `isExportEquals` is set, this node was parsed as an `export default`. If Kind is KindJSExportAssignment, it is a synthetic declaration for `module.exports =`.

func (*ExportAssignment) Clone

func (node *ExportAssignment) Clone(f NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*ExportDeclaration) Clone

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 NodeFactoryCoercible) *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 GetInitializerOfBinaryExpression

func GetInitializerOfBinaryExpression(expr *BinaryExpression) *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 (*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
	// contains filtered or unexported fields
}

func (*ExpressionWithTypeArguments) Clone

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 GetClassExtendsHeritageElement

func GetClassExtendsHeritageElement(node *Node) *ExpressionWithTypeArgumentsNode

func GetExtendsHeritageClauseElement

func GetExtendsHeritageClauseElement(node *Node) *ExpressionWithTypeArgumentsNode

func GetExtendsHeritageClauseElements

func GetExtendsHeritageClauseElements(node *Node) []*ExpressionWithTypeArgumentsNode

func GetImplementsHeritageClauseElements

func GetImplementsHeritageClauseElements(node *Node) []*ExpressionWithTypeArgumentsNode

func GetImplementsTypeNodes

func GetImplementsTypeNodes(node *Node) []*ExpressionWithTypeArgumentsNode

type ExternalModuleIndicatorOptions

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

func GetExternalModuleIndicatorOptions

func GetExternalModuleIndicatorOptions(fileName string, options *core.CompilerOptions, metadata SourceFileMetaData) ExternalModuleIndicatorOptions

type ExternalModuleReference

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

func (*ExternalModuleReference) Clone

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
)

func ToFindAncestorResult

func ToFindAncestorResult(b bool) FindAncestorResult

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
	// contains filtered or unexported fields
}

func (*ForInOrOfStatement) Clone

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
	// contains filtered or unexported fields
}

func (*ForStatement) Clone

func (node *ForStatement) Clone(f NodeFactoryCoercible) *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 (*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 (*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
	FullSignature  *TypeNode // Type that applies to the whole function; should not be set if Type is set or if Parameters have types set.
}

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 NodeFactoryCoercible) *Node

func (*FunctionTypeNode) VisitEachChild

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

type GetAccessorDeclaration

type GetAccessorDeclaration struct {
	AccessorDeclarationBase
}

func (*GetAccessorDeclaration) Clone

func (*GetAccessorDeclaration) VisitEachChild

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

type HasFileName

type HasFileName interface {
	FileName() string
	Path() tspath.Path
}

func NewHasFileName

func NewHasFileName(fileName string, path tspath.Path) HasFileName

type HeritageClause

type HeritageClause struct {
	NodeBase

	Token Kind
	Types *NodeList // NodeList[*ExpressionWithTypeArgumentsNode]
	// contains filtered or unexported fields
}

func (*HeritageClause) Clone

func (node *HeritageClause) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

func (*Identifier) SubtreeFacts

func (node *Identifier) SubtreeFacts() SubtreeFacts

type IdentifierNode

type IdentifierNode = Node

type IfStatement

type IfStatement struct {
	StatementBase

	Expression    *Expression // Expression
	ThenStatement *Statement  // Statement
	ElseStatement *Statement  // Statement. Optional
	// contains filtered or unexported fields
}

func (*IfStatement) Clone

func (node *IfStatement) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*ImportAttributes) Clone

func (node *ImportAttributes) Clone(f NodeFactoryCoercible) *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

func (*ImportAttributesNode) GetResolutionModeOverride

func (node *ImportAttributesNode) GetResolutionModeOverride() (core.ResolutionMode, bool)

type ImportClause

type ImportClause struct {
	NodeBase
	DeclarationBase
	ExportableBase

	IsTypeOnly    bool
	NamedBindings *NamedImportBindings // NamedImportBindings. Optional, named bindings
	// contains filtered or unexported fields
}

func GetImportClauseOfDeclaration

func GetImportClauseOfDeclaration(declaration *Declaration) *ImportClause

func (*ImportClause) Clone

func (node *ImportClause) Clone(f NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*ImportDeclaration) Clone

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 (*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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

func (*ImportTypeNode) ForEachChild

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

func (*ImportTypeNode) VisitEachChild

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

type IndexSignatureDeclaration

type IndexSignatureDeclaration struct {
	NodeBase
	DeclarationBase
	ModifiersBase
	FunctionLikeBase
	TypeElementBase
	ClassElementBase
	// contains filtered or unexported fields
}

func (*IndexSignatureDeclaration) Clone

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 (*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 NodeFactoryCoercible) *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 (*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 (*IntersectionTypeNode) VisitEachChild

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

type JSDeclarationKind

type JSDeclarationKind int
const (
	JSDeclarationKindNone JSDeclarationKind = iota
	/// module.exports = expr
	JSDeclarationKindModuleExports
	/// exports.name = expr
	/// module.exports.name = expr
	JSDeclarationKindExportsProperty
	/// className.prototype.name = expr
	JSDeclarationKindPrototypeProperty
	/// this.name = expr
	JSDeclarationKindThisProperty
	/// F.name = expr, F[name] = expr
	JSDeclarationKindProperty
)

func GetAssignmentDeclarationKind

func GetAssignmentDeclarationKind(bin *BinaryExpression) JSDeclarationKind

type JSDoc

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

func (*JSDoc) Clone

func (node *JSDoc) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

type JSDocAugmentsTag

type JSDocAugmentsTag struct {
	JSDocTagBase
	ClassName *Expression
}

JSDocAugmentsTag

func (*JSDocAugmentsTag) Clone

func (node *JSDocAugmentsTag) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

func (*JSDocCallbackTag) ForEachChild

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

func (*JSDocCallbackTag) Name

func (node *JSDocCallbackTag) Name() *DeclarationName

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
	// contains filtered or unexported fields
}

type JSDocDeprecatedTag

type JSDocDeprecatedTag struct {
	JSDocTagBase
}

JSDocDeprecatedTag

func (*JSDocDeprecatedTag) Clone

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 (*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 *Expression
	Attributes      *Node
}

JSDocImportTag

func (*JSDocImportTag) Clone

func (node *JSDocImportTag) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 (*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 JSDocNode

type JSDocNode = Node

type JSDocNonNullableType

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

func (*JSDocNonNullableType) Clone

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 (*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 (*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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

func (*JSDocOverrideTag) ForEachChild

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

func (*JSDocOverrideTag) VisitEachChild

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

type JSDocParameterOrPropertyTag

type JSDocParameterOrPropertyTag struct {
	JSDocTagBase

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

JSDocParameterOrPropertyTag

func (*JSDocParameterOrPropertyTag) Clone

func (*JSDocParameterOrPropertyTag) ForEachChild

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

func (*JSDocParameterOrPropertyTag) Name

func (*JSDocParameterOrPropertyTag) VisitEachChild

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

type JSDocParameterTag

type JSDocParameterTag = JSDocParameterOrPropertyTag

type JSDocParsingMode

type JSDocParsingMode int
const (
	JSDocParsingModeParseAll JSDocParsingMode = iota
	JSDocParsingModeParseNone
	JSDocParsingModeParseForTypeErrors
	JSDocParsingModeParseForTypeInfo
)

type JSDocPrivateTag

type JSDocPrivateTag struct {
	JSDocTagBase
}

JSDocPrivateTag

func (*JSDocPrivateTag) Clone

func (node *JSDocPrivateTag) Clone(f NodeFactoryCoercible) *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 = JSDocParameterOrPropertyTag

type JSDocProtectedTag

type JSDocProtectedTag struct {
	JSDocTagBase
}

JSDocProtectedTag

func (*JSDocProtectedTag) Clone

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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 (*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 NodeFactoryCoercible) *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
	FunctionLikeBase
}

JSDocSignature

func (*JSDocSignature) Clone

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

func (*JSDocSignature) ForEachChild

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

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
	TypeParameters *TypeParameterList
}

JSDocTemplateTag

func (*JSDocTemplateTag) Clone

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

func (*JSDocTemplateTag) ForEachChild

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

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 NodeFactoryCoercible) *Node

type JSDocThisTag

type JSDocThisTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

JSDocThisTag

func (*JSDocThisTag) Clone

func (node *JSDocThisTag) Clone(f NodeFactoryCoercible) *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 (*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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

JSDocTypedefTag

func (*JSDocTypedefTag) Clone

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

func (*JSDocTypedefTag) ForEachChild

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

func (*JSDocTypedefTag) Name

func (node *JSDocTypedefTag) Name() *DeclarationName

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 NodeFactoryCoercible) *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 (*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 NodeFactoryCoercible) *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]
	// contains filtered or unexported fields
}

JsxAttributes

func (*JsxAttributes) Clone

func (node *JsxAttributes) Clone(f NodeFactoryCoercible) *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

func GetSemanticJsxChildren

func GetSemanticJsxChildren(children []*JsxChild) []*JsxChild

type JsxChildList

type JsxChildList = NodeList // NodeList[*JsxChild]

type JsxClosingElement

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

func (*JsxClosingElement) Clone

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

type JsxClosingFragmentNode

type JsxClosingFragmentNode = Node

type JsxElement

type JsxElement struct {
	ExpressionBase

	OpeningElement *JsxOpeningElementNode // JsxOpeningElementNode
	Children       *NodeList              // NodeList[*JsxChild]
	ClosingElement *JsxClosingElementNode // JsxClosingElementNode
	// contains filtered or unexported fields
}

func (*JsxElement) Clone

func (node *JsxElement) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*JsxFragment) Clone

func (node *JsxFragment) Clone(f NodeFactoryCoercible) *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 (*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
	// contains filtered or unexported fields
}

func (*JsxOpeningElement) Clone

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

type JsxOpeningFragmentNode

type JsxOpeningFragmentNode = Node

type JsxOpeningLikeElement

type JsxOpeningLikeElement = Node // JsxOpeningElement | JsxSelfClosingElement

type JsxSelfClosingElement

type JsxSelfClosingElement struct {
	ExpressionBase

	TagName       *JsxTagNameExpression // JsxTagNameExpression (IdentifierReference | KeywordExpression | JsxTagNamePropertyAccess | JsxNamespacedName)
	TypeArguments *NodeList             // NodeList[*TypeNode]. Optional
	Attributes    *JsxAttributesNode    // JsxAttributesNode
	// contains filtered or unexported fields
}

func (*JsxSelfClosingElement) Clone

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 (*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 NodeFactoryCoercible) *Node

type KeywordExpression

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

func (*KeywordExpression) Clone

type KeywordTypeNode

type KeywordTypeNode struct {
	TypeNodeBase
}

func (*KeywordTypeNode) Clone

func (node *KeywordTypeNode) Clone(f NodeFactoryCoercible) *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
	// Reparsed JS nodes
	KindJSTypeAliasDeclaration
	KindJSExportAssignment
	KindCommonJSExport
	KindJSImportDeclaration
	// Transformation nodes
	KindNotEmittedStatement
	KindPartiallyEmittedExpression
	KindCommaListExpression
	KindSyntheticReferenceExpression
	KindNotEmittedTypeElement
	// 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
	KindFirstTriviaToken        = KindSingleLineCommentTrivia
	KindLastTriviaToken         = KindConflictMarkerTrivia
)

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 NodeFactoryCoercible) *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 LiteralType

type LiteralType = Node

type LiteralTypeNode

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

func (*LiteralTypeNode) Clone

func (node *LiteralTypeNode) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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

type MethodDeclaration struct {
	NodeBase
	NamedMemberBase
	FunctionLikeWithBodyBase
	FlowNodeBase
	ClassElementBase
	ObjectLiteralElementBase
	// contains filtered or unexported fields
}

func (*MethodDeclaration) Clone

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
	// contains filtered or unexported fields
}

func (*MethodSignatureDeclaration) Clone

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 (*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]
	// contains filtered or unexported fields
}

func (*ModuleBlock) Clone

func (node *ModuleBlock) Clone(f NodeFactoryCoercible) *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

	Keyword Kind // KindModuleKeyword, KindNamespaceKeyword, KindGlobalKeyword (global augmentation)
	// contains filtered or unexported fields
}

func (*ModuleDeclaration) Clone

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 *ExportSpecifierList // NodeList[*ExportSpecifierNode]
	// contains filtered or unexported fields
}

func (*NamedExports) Clone

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

func (*NamedExports) ForEachChild

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

func (*NamedExports) VisitEachChild

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

type NamedExportsNode

type NamedExportsNode = Node

type NamedImportBindings

type NamedImportBindings = Node // NamespaceImport | NamedImports

type NamedImports

type NamedImports struct {
	NodeBase

	Elements *ImportSpecifierList // NodeList[*ImportSpecifierNode]
	// contains filtered or unexported fields
}

func (*NamedImports) Clone

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

func (*NamedImports) ForEachChild

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

func (*NamedImports) VisitEachChild

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

type NamedImportsOrExports

type NamedImportsOrExports = Node // NamedImports | NamedExports

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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 (*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 NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*NewExpression) Clone

func (node *NewExpression) Clone(f NodeFactoryCoercible) *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 CreateModifiersFromModifierFlags

func CreateModifiersFromModifierFlags(flags ModifierFlags, createModifier func(kind Kind) *Node) []*Node

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 FindAncestorKind

func FindAncestorKind(node *Node, kind Kind) *Node

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

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 FindLastVisibleNode

func FindLastVisibleNode(nodes []*Node) *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 GetClassLikeDeclarationOfSymbol

func GetClassLikeDeclarationOfSymbol(symbol *Symbol) *Node

func GetContainingClass

func GetContainingClass(node *Node) *Node

func GetDeclarationContainer

func GetDeclarationContainer(node *Node) *Node

func GetDeclarationOfKind

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

func GetElementOrPropertyAccessName

func GetElementOrPropertyAccessName(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 GetElementsOfBindingOrAssignmentPattern

func GetElementsOfBindingOrAssignmentPattern(name *Node) []*Node

func GetEnclosingBlockScopeContainer

func GetEnclosingBlockScopeContainer(node *Node) *Node

func GetExternalModuleImportEqualsDeclarationExpression

func GetExternalModuleImportEqualsDeclarationExpression(node *Node) *Node

func GetFirstIdentifier

func GetFirstIdentifier(node *Node) *Node

func GetHeritageClause

func GetHeritageClause(node *Node, kind Kind) *Node

func GetHeritageElements

func GetHeritageElements(node *Node, kind Kind) []*Node

func GetImmediatelyInvokedFunctionExpression

func GetImmediatelyInvokedFunctionExpression(fn *Node) *Node

func GetImportAttributes

func GetImportAttributes(node *Node) *Node

func GetInvokedExpression

func GetInvokedExpression(node *Node) *Node

func GetLeftmostAccessExpression

func GetLeftmostAccessExpression(expr *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, includeJSDoc bool) *Node

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

func GetNonAssignedNameOfDeclaration

func GetNonAssignedNameOfDeclaration(declaration *Node) *Node

func GetRestIndicatorOfBindingOrAssignmentElement

func GetRestIndicatorOfBindingOrAssignmentElement(bindingElement *Node) *Node

func GetRightMostAssignedExpression

func GetRightMostAssignedExpression(node *Node) *Node

func GetRootDeclaration

func GetRootDeclaration(node *Node) *Node

func GetSuperContainer

func GetSuperContainer(node *Node, stopOnFunctions bool) *Node

func GetTargetOfBindingOrAssignmentElement

func GetTargetOfBindingOrAssignmentElement(bindingElement *Node) *Node

*

  • Gets the name of an BindingOrAssignmentElement.

func GetThisContainer

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

func GetThisParameter

func GetThisParameter(signature *Node) *Node

func NewFlowReduceLabelData

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

func NewFlowSwitchClauseData

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

func ReplaceModifiers

func ReplaceModifiers(factory *NodeFactory, node *Node, modifierArray *ModifierList) *Node

func SkipTypeParentheses

func SkipTypeParentheses(node *Node) *Node

func TryGetPropertyNameOfBindingOrAssignmentElement

func TryGetPropertyNameOfBindingOrAssignmentElement(bindingElement *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) AsCommonJSExport

func (n *Node) AsCommonJSExport() *CommonJSExport

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) AsJSDocParameterOrPropertyTag

func (n *Node) AsJSDocParameterOrPropertyTag() *JSDocParameterOrPropertyTag

func (*Node) AsJSDocPrivateTag

func (n *Node) AsJSDocPrivateTag() *JSDocPrivateTag

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) AsMutable

func (n *Node) AsMutable() *mutableNode

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) AsNotEmittedStatement

func (n *Node) AsNotEmittedStatement() *NotEmittedStatement

func (*Node) AsNotEmittedTypeElement

func (n *Node) AsNotEmittedTypeElement() *NotEmittedTypeElement

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) AsSyntheticReferenceExpression

func (n *Node) AsSyntheticReferenceExpression() *SyntheticReferenceExpression

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) Attributes

func (n *Node) Attributes() *Node

func (*Node) Body

func (n *Node) Body() *Node

func (*Node) BodyData

func (n *Node) BodyData() *BodyBase

func (*Node) Children

func (n *Node) Children() *NodeList

func (*Node) ClassLikeData

func (n *Node) ClassLikeData() *ClassLikeBase

func (*Node) ClassName

func (n *Node) ClassName() *Node

func (*Node) Clone

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

func (*Node) CommentList

func (n *Node) CommentList() *NodeList

If updating this function, also update `hasComment`.

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) ElementList

func (n *Node) ElementList() *NodeList

func (*Node) Elements

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

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) ImportClause

func (n *Node) ImportClause() *Node

func (*Node) Initializer

func (n *Node) Initializer() *Node

func (*Node) IsJSDoc

func (node *Node) IsJSDoc() bool

func (*Node) IsTypeOnly

func (n *Node) IsTypeOnly() bool

func (*Node) IterChildren

func (n *Node) IterChildren() iter.Seq[*Node]

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) KindString

func (n *Node) KindString() string

func (*Node) KindValue

func (n *Node) KindValue() int16

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) ModuleSpecifier

func (n *Node) ModuleSpecifier() *Expression

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) PostfixToken

func (n *Node) PostfixToken() *Node

func (*Node) Properties

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

func (*Node) PropertyList

func (n *Node) PropertyList() *NodeList

func (*Node) PropertyName

func (n *Node) PropertyName() *Node

func (*Node) PropertyNameOrName

func (n *Node) PropertyNameOrName() *Node

func (*Node) QuestionDotToken

func (n *Node) QuestionDotToken() *Node

func (*Node) QuestionToken

func (n *Node) QuestionToken() *TokenNode

func (*Node) Statement

func (n *Node) Statement() *Statement

func (*Node) StatementList

func (n *Node) StatementList() *NodeList

func (*Node) Statements

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

func (*Node) SubtreeFacts

func (n *Node) SubtreeFacts() SubtreeFacts

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) TypeExpression

func (n *Node) TypeExpression() *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 NodeFactoryCoercible) *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) IterChildren

func (node *NodeDefault) IterChildren() iter.Seq[*Node]

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) SubtreeFacts

func (node *NodeDefault) SubtreeFacts() SubtreeFacts

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) AsNodeFactory

func (f *NodeFactory) AsNodeFactory() *NodeFactory

func (*NodeFactory) DeepCloneNode

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

func (*NodeFactory) DeepCloneReparse

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

func (*NodeFactory) DeepCloneReparseModifiers

func (f *NodeFactory) DeepCloneReparseModifiers(modifiers *ModifierList) *ModifierList

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, fullSignature *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(modifiers *ModifierList, left *Expression, typeNode *TypeNode, 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) NewCommonJSExport

func (f *NodeFactory) NewCommonJSExport(modifiers *ModifierList, name *IdentifierNode, typeNode *TypeNode, initializer *Expression) *Node

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, fullSignature *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, typeNode *TypeNode, 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, fullSignature *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewFunctionExpression

func (f *NodeFactory) NewFunctionExpression(modifiers *ModifierList, asteriskToken *TokenNode, name *IdentifierNode, typeParameters *NodeList, parameters *NodeList, returnType *TypeNode, fullSignature *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, fullSignature *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 *NodeList, 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, name *IdentifierNode, 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) NewJSExportAssignment

func (f *NodeFactory) NewJSExportAssignment(t *TypeNode, expression *Expression) *Node

func (*NodeFactory) NewJSImportDeclaration

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

func (*NodeFactory) NewJSTypeAliasDeclaration

func (f *NodeFactory) NewJSTypeAliasDeclaration(modifiers *ModifierList, name *IdentifierNode, typeParameters *NodeList, 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, fullSignature *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, keyword Kind, name *ModuleName, body *ModuleBody) *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) NewNotEmittedStatement

func (f *NodeFactory) NewNotEmittedStatement() *Node

func (*NodeFactory) NewNotEmittedTypeElement

func (f *NodeFactory) NewNotEmittedTypeElement() *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, typeNode *TypeNode, 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, fullSignature *TypeNode, body *BlockNode) *Node

func (*NodeFactory) NewShorthandPropertyAssignment

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

func (*NodeFactory) NewSourceFile

func (f *NodeFactory) NewSourceFile(opts SourceFileParseOptions, text string, statements *NodeList, endOfFileToken *TokenNode) *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) NewSyntheticReferenceExpression

func (f *NodeFactory) NewSyntheticReferenceExpression(expr *Expression, thisArg *Expression) *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) NodeCount

func (f *NodeFactory) NodeCount() int

func (*NodeFactory) TextCount

func (f *NodeFactory) TextCount() int

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, fullSignature *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, modifiers *ModifierList, left *Expression, typeNode *TypeNode, 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) UpdateCommonJSExport

func (f *NodeFactory) UpdateCommonJSExport(node *CommonJSExport, modifiers *ModifierList, name *IdentifierNode, typeNode *TypeNode, initializer *Expression) *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, fullSignature *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, typeNode *TypeNode, 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, fullSignature *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, fullSignature *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, fullSignature *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) UpdateJSDocParameterOrPropertyTag

func (f *NodeFactory) UpdateJSDocParameterOrPropertyTag(kind Kind, node *JSDocParameterOrPropertyTag, 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) 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 *NodeList, 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 *IdentifierNode, 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, fullSignature *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, keyword Kind, 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, typeNode *TypeNode, 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, fullSignature *TypeNode, body *BlockNode) *Node

func (*NodeFactory) UpdateShorthandPropertyAssignment

func (f *NodeFactory) UpdateShorthandPropertyAssignment(node *ShorthandPropertyAssignment, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeNode *TypeNode, equalsToken *TokenNode, objectAssignmentInitializer *Expression) *Node

func (*NodeFactory) UpdateSourceFile

func (f *NodeFactory) UpdateSourceFile(node *SourceFile, statements *StatementList, endOfFileToken *TokenNode) *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) UpdateSyntheticReferenceExpression

func (f *NodeFactory) UpdateSyntheticReferenceExpression(node *SyntheticReferenceExpression, expr *Expression, thisArg *Expression) *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 NodeFactoryCoercible

type NodeFactoryCoercible interface {
	AsNodeFactory() *NodeFactory
}

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
	NodeFlagsReparsed                        NodeFlags = 1 << 3  // Node was synthesized during parsing
	NodeFlagsSynthesized                     NodeFlags = 1 << 4  // Node was synthesized during transformation
	NodeFlagsOptionalChain                   NodeFlags = 1 << 5  // Chained MemberExpression rooted to a pseudo-OptionalExpression
	NodeFlagsExportContext                   NodeFlags = 1 << 6  // Export context (initialized by binding)
	NodeFlagsContainsThis                    NodeFlags = 1 << 7  // Interface contains references to "this"
	NodeFlagsHasImplicitReturn               NodeFlags = 1 << 8  // If function implicitly returns on one of codepaths (initialized by binding)
	NodeFlagsHasExplicitReturn               NodeFlags = 1 << 9  // If function has explicit reachable return on one of codepaths (initialized by binding)
	NodeFlagsDisallowInContext               NodeFlags = 1 << 10 // If node was parsed in a context where 'in-expressions' are not allowed
	NodeFlagsYieldContext                    NodeFlags = 1 << 11 // If node was parsed in the 'yield' context created when parsing a generator
	NodeFlagsDecoratorContext                NodeFlags = 1 << 12 // If node was parsed as part of a decorator
	NodeFlagsAwaitContext                    NodeFlags = 1 << 13 // If node was parsed in the 'await' context created when parsing an async function
	NodeFlagsDisallowConditionalTypesContext NodeFlags = 1 << 14 // If node was parsed in a context where conditional types are not allowed
	NodeFlagsThisNodeHasError                NodeFlags = 1 << 15 // If the parser encountered an error when parsing the code that created this node
	NodeFlagsJavaScriptFile                  NodeFlags = 1 << 16 // If node was parsed in a JavaScript
	NodeFlagsThisNodeOrAnySubNodesHasError   NodeFlags = 1 << 17 // If this node or any of its children had an error
	NodeFlagsHasAggregatedChildData          NodeFlags = 1 << 18 // 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 << 19
	NodeFlagsPossiblyContainsImportMeta    NodeFlags = 1 << 20

	NodeFlagsHasJSDoc        NodeFlags = 1 << 21 // If node has preceding JSDoc comment(s)
	NodeFlagsJSDoc           NodeFlags = 1 << 22 // If node was parsed inside jsdoc
	NodeFlagsAmbient         NodeFlags = 1 << 23 // If node was inside an ambient context -- a declaration file, or inside something with the `declare` modifier.
	NodeFlagsInWithStatement NodeFlags = 1 << 24 // If any ancestor of node was the `statement` of a WithStatement (not the `expression`)
	NodeFlagsJsonFile        NodeFlags = 1 << 25 // If node was parsed in a Json
	NodeFlagsDeprecated      NodeFlags = 1 << 26 // 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

	// 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
)

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 NodeFactoryCoercible) *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 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 (*NonNullExpression) ForEachChild

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

func (*NonNullExpression) VisitEachChild

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

type NotEmittedStatement

type NotEmittedStatement struct {
	StatementBase
}

Represents a statement that is elided as part of a transformation to emit comments on a not-emitted node.

func (*NotEmittedStatement) Clone

type NotEmittedTypeElement

type NotEmittedTypeElement struct {
	NodeBase
	TypeElementBase
}

Represents a type element that is elided as part of a transformation to emit comments on a not-emitted node.

func (*NotEmittedTypeElement) Clone

type NumericLiteral

type NumericLiteral struct {
	ExpressionBase
	LiteralLikeBase
}

func (*NumericLiteral) Clone

func (node *NumericLiteral) Clone(f NodeFactoryCoercible) *Node

type NumericOrStringLikeLiteral

type NumericOrStringLikeLiteral = Node // StringLiteralLike | NumericLiteral

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
	// contains filtered or unexported fields
}

func (*ObjectLiteralExpression) Clone

func (*ObjectLiteralExpression) ForEachChild

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

func (*ObjectLiteralExpression) VisitEachChild

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

type ObjectLiteralExpressionNode

type ObjectLiteralExpressionNode = Node

type ObjectLiteralLike

type ObjectLiteralLike = Node // ObjectLiteralExpression | ObjectBindingPattern

type ObjectTypeDeclaration

type ObjectTypeDeclaration = Node // ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode

type OmittedExpression

type OmittedExpression struct {
	ExpressionBase
}

func (*OmittedExpression) Clone

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 NodeFactoryCoercible) *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
const (
	OEKParentheses                  OuterExpressionKinds = 1 << 0
	OEKTypeAssertions               OuterExpressionKinds = 1 << 1
	OEKNonNullAssertions            OuterExpressionKinds = 1 << 2
	OEKPartiallyEmittedExpressions  OuterExpressionKinds = 1 << 3
	OEKExpressionsWithTypeArguments OuterExpressionKinds = 1 << 4
	OEKSatisfies                    OuterExpressionKinds = 1 << 5
	OEKExcludeJSDocTypeAssertion                         = 1 << 6
	OEKAssertions                                        = OEKTypeAssertions | OEKNonNullAssertions | OEKSatisfies
	OEKAll                                               = OEKParentheses | OEKAssertions | OEKPartiallyEmittedExpressions | OEKExpressionsWithTypeArguments
)

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 (*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 (*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 (*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 (*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 (*PostfixUnaryExpression) ForEachChild

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

func (*PostfixUnaryExpression) VisitEachChild

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

type Pragma

type Pragma struct {
	CommentRange
	Name string
	Args map[string]PragmaArgument
}

func GetPragmaFromSourceFile

func GetPragmaFromSourceFile(file *SourceFile, name string) *Pragma

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 (*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

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 (*PropertyAccessExpression) ForEachChild

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

func (*PropertyAccessExpression) Name

func (*PropertyAccessExpression) VisitEachChild

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

type PropertyAccessExpressionNode

type PropertyAccessExpressionNode = Node

type PropertyAssignment

type PropertyAssignment struct {
	NodeBase
	NamedMemberBase
	ObjectLiteralElementBase

	Type        *TypeNode   // TypeNode. Only set by JSDoc @type tags.
	Initializer *Expression // Expression
	// contains filtered or unexported fields
}

func (*PropertyAssignment) Clone

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
	// contains filtered or unexported fields
}

func (*PropertyDeclaration) Clone

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
	// contains filtered or unexported fields
}

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
	// contains filtered or unexported fields
}

func (*QualifiedName) Clone

func (node *QualifiedName) Clone(f NodeFactoryCoercible) *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

type RestTypeNode

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

func (*RestTypeNode) Clone

func (node *RestTypeNode) Clone(f NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*ReturnStatement) Clone

func (node *ReturnStatement) Clone(f NodeFactoryCoercible) *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 (*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

type SetAccessorDeclaration

type SetAccessorDeclaration struct {
	AccessorDeclarationBase
}

func (*SetAccessorDeclaration) Clone

func (*SetAccessorDeclaration) VisitEachChild

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

type ShorthandPropertyAssignment

type ShorthandPropertyAssignment struct {
	NodeBase
	NamedMemberBase
	ObjectLiteralElementBase

	Type                        *TypeNode // TypeNode. Only set by JSDoc @type tags.
	EqualsToken                 *TokenNode
	ObjectAssignmentInitializer *Expression // Optional
	// contains filtered or unexported fields
}

func (*ShorthandPropertyAssignment) Clone

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

	Statements     *NodeList  // NodeList[*Statement]
	EndOfFileToken *TokenNode // TokenNode[*EndOfFileToken]

	LanguageVariant             core.LanguageVariant
	ScriptKind                  core.ScriptKind
	IsDeclarationFile           bool
	UsesUriStyleNodeCoreModules core.Tristate
	Identifiers                 map[string]string
	IdentifierCount             int

	ModuleAugmentations []*ModuleName // []ModuleName
	AmbientModuleNames  []string
	CommentDirectives   []CommentDirective

	Pragmas                 []Pragma
	ReferencedFiles         []*FileReference
	TypeReferenceDirectives []*FileReference
	LibReferenceDirectives  []*FileReference
	CheckJsDirective        *CheckJsDirective
	NodeCount               int
	TextCount               int
	CommonJSModuleIndicator *Node
	ExternalModuleIndicator *Node

	BindSuggestionDiagnostics []*Diagnostic
	EndFlowNode               *FlowNode
	SymbolCount               int
	ClassifiableNames         collections.Set[string]
	PatternAmbientModules     []*PatternAmbientModule
	// contains filtered or unexported fields
}

func GetSourceFileOfModule

func GetSourceFileOfModule(module *Symbol) *SourceFile

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 NodeFactoryCoercible) *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) GetDeclarationMap

func (node *SourceFile) GetDeclarationMap() map[string][]*Node

func (*SourceFile) GetOrCreateToken

func (node *SourceFile) GetOrCreateToken(
	kind Kind,
	pos int,
	end int,
	parent *Node,
) *TokenNode

func (*SourceFile) Imports

func (node *SourceFile) Imports() []*LiteralLikeNode

func (*SourceFile) IsBound

func (node *SourceFile) IsBound() bool

func (*SourceFile) IsJS

func (node *SourceFile) IsJS() bool

func (*SourceFile) JSDiagnostics

func (node *SourceFile) JSDiagnostics() []*Diagnostic

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) ParseOptions

func (node *SourceFile) ParseOptions() SourceFileParseOptions

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) SetJSDiagnostics

func (node *SourceFile) SetJSDiagnostics(diags []*Diagnostic)

func (*SourceFile) SetJSDocCache

func (node *SourceFile) SetJSDocCache(cache map[*Node][]*Node)

func (*SourceFile) SetJSDocDiagnostics

func (node *SourceFile) SetJSDocDiagnostics(diags []*Diagnostic)

func (*SourceFile) Text

func (node *SourceFile) Text() string

func (*SourceFile) VisitEachChild

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

type SourceFileLike

type SourceFileLike interface {
	Text() string
	LineMap() []core.TextPos
}

type SourceFileMetaData

type SourceFileMetaData struct {
	PackageJsonType      string
	PackageJsonDirectory string
	ImpliedNodeFormat    core.ResolutionMode
}

type SourceFileNode

type SourceFileNode = Node

type SourceFileParseOptions

type SourceFileParseOptions struct {
	FileName                       string
	Path                           tspath.Path
	CompilerOptions                core.SourceFileAffectingCompilerOptions
	ExternalModuleIndicatorOptions ExternalModuleIndicatorOptions
	JSDocParsingMode               JSDocParsingMode
}

type SpreadAssignment

type SpreadAssignment struct {
	NodeBase
	DeclarationBase
	ObjectLiteralElementBase
	Expression *Expression // Expression
}

func (*SpreadAssignment) Clone

func (node *SpreadAssignment) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

type StringLiteralLike

type StringLiteralLike = Node // StringLiteral | NoSubstitutionTemplateLiteral

type StringLiteralNode

type StringLiteralNode = Node

type SubtreeFacts

type SubtreeFacts int32

type SwitchStatement

type SwitchStatement struct {
	StatementBase

	Expression *Expression    // Expression
	CaseBlock  *CaseBlockNode // CaseBlockNode
	// contains filtered or unexported fields
}

func (*SwitchStatement) Clone

func (node *SwitchStatement) Clone(f NodeFactoryCoercible) *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 collections.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 NodeFactoryCoercible) *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

type SyntheticReferenceExpression

type SyntheticReferenceExpression struct {
	ExpressionBase
	Expression *Expression
	ThisArg    *Expression
}

func (*SyntheticReferenceExpression) Clone

func (*SyntheticReferenceExpression) ForEachChild

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

func (*SyntheticReferenceExpression) VisitEachChild

func (node *SyntheticReferenceExpression) VisitEachChild(v *NodeVisitor) *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
	// contains filtered or unexported fields
}

func (*TaggedTemplateExpression) Clone

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]
	// contains filtered or unexported fields
}

func (*TemplateExpression) Clone

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 NodeFactoryCoercible) *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 (*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
	// contains filtered or unexported fields
}

func (*TemplateLiteralTypeSpan) Clone

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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 NodeFactoryCoercible) *Node

type TemplateTailNode

type TemplateTailNode = Node

type ThisTypeNode

type ThisTypeNode struct {
	TypeNodeBase
}

func (*ThisTypeNode) Clone

func (node *ThisTypeNode) Clone(f NodeFactoryCoercible) *Node

type ThrowStatement

type ThrowStatement struct {
	StatementBase

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

func (*ThrowStatement) Clone

func (node *ThrowStatement) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 = TokenFlagsUnterminated | TokenFlagsHexEscape | TokenFlagsUnicodeEscape | TokenFlagsExtendedUnicodeEscape | TokenFlagsContainsInvalidEscape | TokenFlagsSingleQuote
	TokenFlagsNumericLiteralFlags            TokenFlags = TokenFlagsScientific | TokenFlagsOctal | TokenFlagsContainsLeadingZero | TokenFlagsWithSpecifier | TokenFlagsContainsSeparator | TokenFlagsContainsInvalidSeparator
	TokenFlagsTemplateLiteralLikeFlags       TokenFlags = TokenFlagsUnterminated | TokenFlagsHexEscape | TokenFlagsUnicodeEscape | TokenFlagsExtendedUnicodeEscape | TokenFlagsContainsInvalidEscape
	TokenFlagsRegularExpressionLiteralFlags  TokenFlags = TokenFlagsUnterminated
	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
	// contains filtered or unexported fields
}

func (*TryStatement) Clone

func (node *TryStatement) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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 (*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 NodeFactoryCoercible) *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 TypeLiteral

type TypeLiteral = Node

type TypeLiteralNode

type TypeLiteralNode struct {
	TypeNodeBase
	DeclarationBase
	Members *NodeList // NodeList[*TypeElement]
}

func (*TypeLiteralNode) Clone

func (node *TypeLiteralNode) Clone(f NodeFactoryCoercible) *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

func GetTypeAnnotationNode

func GetTypeAnnotationNode(node *Node) *TypeNode

type TypeNodeBase

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

type TypeOfExpression

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

func (*TypeOfExpression) Clone

func (node *TypeOfExpression) Clone(f NodeFactoryCoercible) *Node

func (*TypeOfExpression) ForEachChild

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

func (*TypeOfExpression) VisitEachChild

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

type TypeOnlyImportDeclaration

type TypeOnlyImportDeclaration = Node // ImportClause | ImportEqualsDeclaration | ImportSpecifier | NamespaceImport with isTypeOnly: true

type TypeOperatorNode

type TypeOperatorNode struct {
	TypeNodeBase
	Operator Kind      // KindKeyOfKeyword | KindUniqueKeyword | KindReadonlyKeyword
	Type     *TypeNode // TypeNode
}

func (*TypeOperatorNode) Clone

func (node *TypeOperatorNode) Clone(f NodeFactoryCoercible) *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
	Expression  *Expression // Expression. Optional, for error recovery purposes
	DefaultType *TypeNode   // TypeNode. Optional
	// contains filtered or unexported fields
}

func (*TypeParameterDeclaration) Clone

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

	// JSDoc precedence (optional and variadic types)
	//
	//    JSDocType:
	//      `...`? Type `=`?
	TypePrecedenceJSDoc

	// 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 (*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 NodeFactoryCoercible) *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 (*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 UnionType

type UnionType = Node

type UnionTypeNode

type UnionTypeNode struct {
	UnionOrIntersectionTypeNodeBase
}

func (*UnionTypeNode) Clone

func (node *UnionTypeNode) Clone(f NodeFactoryCoercible) *Node

func (*UnionTypeNode) VisitEachChild

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

type ValidImportTypeNode

type ValidImportTypeNode = Node // ImportTypeNode & { argument: LiteralTypeNode & { literal: StringLiteral } }

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 (*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]
	// contains filtered or unexported fields
}

func (*VariableDeclarationList) Clone

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
	// contains filtered or unexported fields
}

func (*VariableStatement) Clone

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 NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*WhileStatement) Clone

func (node *WhileStatement) Clone(f NodeFactoryCoercible) *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
	// contains filtered or unexported fields
}

func (*WithStatement) Clone

func (node *WithStatement) Clone(f NodeFactoryCoercible) *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 NodeFactoryCoercible) *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