ast

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 15 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
	SubtreeContainsPrivateIdentifierInExpression
	SubtreeContainsInvalidTemplateEscape

	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 | SubtreeContainsInvalidTemplateEscape
	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
	InternalSymbolNameAssignmentDeclaration   = InternalSymbolNamePrefix + "assignment"              // Assignment declarations
	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 ChildIsDecorated

func ChildIsDecorated(useLegacyDecorators bool, node *Node, parent *Node) bool

func ClassElementOrClassElementParameterIsDecorated

func ClassElementOrClassElementParameterIsDecorated(useLegacyDecorators bool, node *Node, parent *Node) bool

func ClassOrConstructorParameterIsDecorated

func ClassOrConstructorParameterIsDecorated(useLegacyDecorators bool, node *Node) bool

func CompareDiagnostics

func CompareDiagnostics(d1, d2 *Diagnostic) int

func CompareNodePositions

func CompareNodePositions(n1, n2 *Node) 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 EntityNameToString

func EntityNameToString(name *Node, getTextOfNode func(*Node) string) string

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 GetDeclarationName

func GetDeclarationName(declaration *Node) string

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 GetTextOfPropertyName

func GetTextOfPropertyName(name *Node) string

func HasAbstractModifier

func HasAbstractModifier(node *Node) bool

func HasAccessorModifier

func HasAccessorModifier(node *Node) bool

func HasAmbientModifier

func HasAmbientModifier(node *Node) bool

func HasContextSensitiveParameters

func HasContextSensitiveParameters(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 HasInferredType

func HasInferredType(node *Node) bool

func HasInitializer

func HasInitializer(node *Node) bool

func HasModifier

func HasModifier(node *Node, flags ModifierFlags) 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 HasTypeArguments

func HasTypeArguments(node *Node) 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 IsAdditiveOperator

func IsAdditiveOperator(kind Kind) bool

func IsAdditiveOperatorOrHigher

func IsAdditiveOperatorOrHigher(kind Kind) 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

Checks if the node is a genuine import declation. In particular the re-parsed KindJSImportDeclaration is explicitly excluded because the callers of this function are typically not prepared to handle it properly. For more permissive check, use IsImportNode.

func IsArgumentExpressionOfElementAccess

func IsArgumentExpressionOfElementAccess(node *Node) bool

func IsArrayBindingOrAssignmentElement

func IsArrayBindingOrAssignmentElement(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 IsArrayTypeNode

func IsArrayTypeNode(node *Node) bool

func IsArrowFunction

func IsArrowFunction(node *Node) bool

func IsAsExpression

func IsAsExpression(node *Node) bool

func IsAssertionExpression

func IsAssertionExpression(node *Node) bool

func IsAssignmentExpression

func IsAssignmentExpression(node *Node, excludeCompoundAssignment bool) bool

func IsAssignmentOperator

func IsAssignmentOperator(kind Kind) bool

func IsAssignmentOperatorOrHigher

func IsAssignmentOperatorOrHigher(kind 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 IsAsyncFunction

func IsAsyncFunction(node *Node) bool

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 IsBinaryOperator

func IsBinaryOperator(kind Kind) bool

func IsBindableObjectDefinePropertyCall

func IsBindableObjectDefinePropertyCall(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 IsBitwiseOperator

func IsBitwiseOperator(kind Kind) bool

func IsBitwiseOperatorOrHigher

func IsBitwiseOperatorOrHigher(kind Kind) 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 IsBreakStatement

func IsBreakStatement(node *Node) bool

func IsCallExpression

func IsCallExpression(node *Node) bool

func IsCallExpressionTarget

func IsCallExpressionTarget(node *Node, includeElementAccess bool, skipPastOuterExpressions bool) bool

func IsCallLikeExpression

func IsCallLikeExpression(node *Node) bool

func IsCallLikeOrFunctionLikeExpression

func IsCallLikeOrFunctionLikeExpression(node *Node) bool

func IsCallOrNewExpression

func IsCallOrNewExpression(node *Node) bool

func IsCallOrNewExpressionTarget

func IsCallOrNewExpressionTarget(node *Node, includeElementAccess bool, skipPastOuterExpressions bool) bool

func IsCallSignatureDeclaration

func IsCallSignatureDeclaration(node *Node) bool

func IsCaseBlock

func IsCaseBlock(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 IsCompoundAssignment

func IsCompoundAssignment(token Kind) bool

func IsCompoundAssignmentOperator

func IsCompoundAssignmentOperator(kind Kind) 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 IsContinueStatement

func IsContinueStatement(node *Node) bool

func IsDebuggerStatement

func IsDebuggerStatement(node *Node) 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 IsDecoratorTarget

func IsDecoratorTarget(node *Node, includeElementAccess bool, skipPastOuterExpressions bool) bool

func IsDefaultClause

func IsDefaultClause(node *Node) bool

func IsDefaultImport

func IsDefaultImport(node *Node) bool

func IsDeleteExpression

func IsDeleteExpression(node *Node) bool

func IsDeprecatedDeclaration

func IsDeprecatedDeclaration(declaration *Node) bool

IsDeprecatedDeclaration reports whether the given declaration is marked as @deprecated. It checks NodeFlagsPossiblyContainsDeprecatedTag on combined node flags, then confirms by walking up to find the node with the flag and performing a JSDoc lookup.

func IsDeprecatedDeclarationWithCachedFlags

func IsDeprecatedDeclarationWithCachedFlags(declaration *Node, combinedFlags NodeFlags) bool

IsDeprecatedDeclarationWithCachedFlags is the core logic for IsDeprecatedDeclaration, parameterized on pre-computed combined flags so the checker can supply cached flags.

func IsDestructuringAssignment

func IsDestructuringAssignment(node *Node) bool

func IsDoStatement

func IsDoStatement(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 IsEqualityOperator

func IsEqualityOperator(kind Kind) bool

func IsEqualityOperatorOrHigher

func IsEqualityOperatorOrHigher(kind Kind) bool

func IsExclusivelyTypeOnlyImportOrExport

func IsExclusivelyTypeOnlyImportOrExport(node *Node) bool

func IsExpandoInitializer

func IsExpandoInitializer(initializer *Node) bool

func IsExpandoPropertyDeclaration

func IsExpandoPropertyDeclaration(node *Node) bool

func IsExponentiationOperator

func IsExponentiationOperator(kind Kind) 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 IsImplicitlyExportedJSTypeAlias

func IsImplicitlyExportedJSTypeAlias(node *Node) bool

func IsImportAttribute

func IsImportAttribute(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 IsImportNode

func IsImportNode(node *Node) bool

func IsImportOrExportSpecifier

func IsImportOrExportSpecifier(node *Node) bool

func IsImportOrImportEqualsDeclaration

func IsImportOrImportEqualsDeclaration(node *Node) bool

func IsImportPhaseModifierKind

func IsImportPhaseModifierKind(kind Kind) 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 IsInfinityOrNaNString

func IsInfinityOrNaNString(name string) 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 IsInstantiatedModule

func IsInstantiatedModule(node *Node, preserveConstEnums bool) 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 IsJSDoc

func IsJSDoc(node *Node) bool

func IsJSDocAllType

func IsJSDocAllType(node *Node) 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 IsJSDocLink(node *Node) bool

func IsJSDocLinkCode

func IsJSDocLinkCode(node *Node) bool

func IsJSDocLinkLike

func IsJSDocLinkLike(node *Node) bool

func IsJSDocLinkPlain

func IsJSDocLinkPlain(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 IsJSDocNodeKind

func IsJSDocNodeKind(kind Kind) bool

func IsJSDocNonNullableType

func IsJSDocNonNullableType(node *Node) bool

func IsJSDocNullableType

func IsJSDocNullableType(node *Node) bool

func IsJSDocOptionalType

func IsJSDocOptionalType(node *Node) bool

func IsJSDocOverloadTag

func IsJSDocOverloadTag(node *Node) bool

func IsJSDocOverrideTag

func IsJSDocOverrideTag(node *Node) bool

func IsJSDocParameterTag

func IsJSDocParameterTag(node *Node) bool

func IsJSDocPrivateTag

func IsJSDocPrivateTag(node *Node) bool

func IsJSDocPropertyTag

func IsJSDocPropertyTag(node *Node) bool

func IsJSDocProtectedTag

func IsJSDocProtectedTag(node *Node) bool

func IsJSDocPublicTag

func IsJSDocPublicTag(node *Node) bool

func IsJSDocReadonlyTag

func IsJSDocReadonlyTag(node *Node) bool

func IsJSDocReturnTag

func IsJSDocReturnTag(node *Node) bool

func IsJSDocSatisfiesTag

func IsJSDocSatisfiesTag(node *Node) bool

func IsJSDocSeeTag

func IsJSDocSeeTag(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(node *Node) bool

func IsJSDocText

func IsJSDocText(node *Node) bool

func IsJSDocThisTag

func IsJSDocThisTag(node *Node) bool

func IsJSDocThrowsTag

func IsJSDocThrowsTag(node *Node) bool

func IsJSDocTypeAssertion

func IsJSDocTypeAssertion(node *Node) bool

func IsJSDocTypeExpression

func IsJSDocTypeExpression(node *Node) bool

func IsJSDocTypeLiteral

func IsJSDocTypeLiteral(node *Node) bool

func IsJSDocTypeTag

func IsJSDocTypeTag(node *Node) bool

func IsJSDocTypedefTag

func IsJSDocTypedefTag(node *Node) bool

func IsJSDocUnknownTag

func IsJSDocUnknownTag(node *Node) bool

func IsJSDocVariadicType

func IsJSDocVariadicType(node *Node) bool

func IsJSExportAssignment

func IsJSExportAssignment(node *Node) bool

func IsJSImportDeclaration

func IsJSImportDeclaration(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 IsJsxClosingFragment

func IsJsxClosingFragment(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 IsJsxOpeningLikeElementTagName

func IsJsxOpeningLikeElementTagName(node *Node, includeElementAccess bool, skipPastOuterExpressions bool) 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 IsJsxTokenKind

func IsJsxTokenKind(kind Kind) bool

func IsJumpStatementTarget

func IsJumpStatementTarget(node *Node) bool

func IsKeyword

func IsKeyword(token Kind) bool

func IsKeywordExpression

func IsKeywordExpression(node *Node) bool

func IsKeywordExpressionKind

func IsKeywordExpressionKind(kind Kind) bool

func IsKeywordKind

func IsKeywordKind(kind Kind) bool

func IsKeywordTypeKind

func IsKeywordTypeKind(kind Kind) bool

func IsKeywordTypeNode

func IsKeywordTypeNode(node *Node) 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 IsLogicalOperator

func IsLogicalOperator(kind Kind) bool

func IsLogicalOperatorOrHigher

func IsLogicalOperatorOrHigher(kind Kind) bool

func IsLogicalOrCoalescingAssignmentExpression

func IsLogicalOrCoalescingAssignmentExpression(expr *Node) bool

func IsLogicalOrCoalescingAssignmentOperator

func IsLogicalOrCoalescingAssignmentOperator(kind 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 IsMethodOrAccessor

func IsMethodOrAccessor(node *Node) bool

func IsMethodSignatureDeclaration

func IsMethodSignatureDeclaration(node *Node) bool

func IsMissingDeclaration

func IsMissingDeclaration(node *Node) bool

func IsModifier

func IsModifier(node *Node) bool

func IsModifierKind

func IsModifierKind(kind 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 IsModuleExportsQualifiedName

func IsModuleExportsQualifiedName(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 IsMultiplicativeOperator

func IsMultiplicativeOperator(kind Kind) bool

func IsMultiplicativeOperatorOrHigher

func IsMultiplicativeOperatorOrHigher(kind Kind) 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 IsNewExpressionTarget

func IsNewExpressionTarget(node *Node, includeElementAccess bool, skipPastOuterExpressions bool) bool

func IsNoSubstitutionTemplateLiteral

func IsNoSubstitutionTemplateLiteral(node *Node) bool

func IsNodeDescendantOf

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

func IsNonContextualKeyword

func IsNonContextualKeyword(token Kind) 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 IsObjectBindingOrAssignmentElement

func IsObjectBindingOrAssignmentElement(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 IsParameterDeclaration

func IsParameterDeclaration(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 IsPostfixUnaryExpression

func IsPostfixUnaryExpression(node *Node) bool

func IsPostfixUnaryOperator

func IsPostfixUnaryOperator(kind Kind) bool

func IsPotentiallyExecutableNode

func IsPotentiallyExecutableNode(node *Node) bool

Returns true for nodes that are considered executable for the purposes of unreachable code detection.

func IsPrefixUnaryExpression

func IsPrefixUnaryExpression(node *Node) bool

func IsPrefixUnaryOperator

func IsPrefixUnaryOperator(kind Kind) bool

func IsPrimitiveLiteralValue

func IsPrimitiveLiteralValue(node *Node, includeBigInt bool) 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 IsPrototypeAccess

func IsPrototypeAccess(node *Node) bool

func IsPseudoLiteralKind

func IsPseudoLiteralKind(kind Kind) bool

func IsPunctuationKind

func IsPunctuationKind(kind 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 IsRelationalOperator

func IsRelationalOperator(kind Kind) bool

func IsRelationalOperatorOrHigher

func IsRelationalOperatorOrHigher(kind Kind) 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 IsRightSideOfPropertyAccess

func IsRightSideOfPropertyAccess(node *Node) bool

func IsRightSideOfQualifiedNameOrPropertyAccess

func IsRightSideOfQualifiedNameOrPropertyAccess(node *Node) bool

func IsSatisfiesExpression

func IsSatisfiesExpression(node *Node) bool

func IsSemicolonClassElement

func IsSemicolonClassElement(node *Node) bool

func IsSetAccessorDeclaration

func IsSetAccessorDeclaration(node *Node) bool

func IsShiftOperator

func IsShiftOperator(kind Kind) bool

func IsShiftOperatorOrHigher

func IsShiftOperatorOrHigher(kind Kind) 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 IsSuperProperty

func IsSuperProperty(node *Node) bool

IsSuperProperty checks if a node is super.x or super[x].

func IsSwitchStatement

func IsSwitchStatement(node *Node) bool

func IsSyntaxList

func IsSyntaxList(node *Node) bool

func IsSyntheticExpression

func IsSyntheticExpression(node *Node) bool

func IsSyntheticReferenceExpression

func IsSyntheticReferenceExpression(node *Node) bool

func IsTagName

func IsTagName(node *Node) bool

func IsTaggedTemplateExpression

func IsTaggedTemplateExpression(node *Node) bool

func IsTaggedTemplateTag

func IsTaggedTemplateTag(node *Node, includeElementAccess bool, skipPastOuterExpressions bool) bool

func IsTemplateExpression

func IsTemplateExpression(node *Node) bool

func IsTemplateHead

func IsTemplateHead(node *Node) bool

func IsTemplateLiteralKind

func IsTemplateLiteralKind(kind Kind) bool

func IsTemplateLiteralToken

func IsTemplateLiteralToken(node *Node) bool

func IsTemplateLiteralTypeNode

func IsTemplateLiteralTypeNode(node *Node) bool

func IsTemplateLiteralTypeSpan

func IsTemplateLiteralTypeSpan(node *Node) bool

func IsTemplateMiddle

func IsTemplateMiddle(node *Node) bool

func IsTemplateSpan

func IsTemplateSpan(node *Node) bool

func IsTemplateTail

func IsTemplateTail(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 IsToken

func IsToken(node *Node) bool

func IsTokenKind

func IsTokenKind(kind Kind) bool

func IsTrivia

func IsTrivia(token Kind) bool

func IsTriviaKind

func IsTriviaKind(kind Kind) bool

func IsTryStatement

func IsTryStatement(node *Node) bool

func IsTupleTypeNode

func IsTupleTypeNode(node *Node) bool

func IsTypeAliasDeclaration

func IsTypeAliasDeclaration(node *Node) bool

func IsTypeAssertion

func IsTypeAssertion(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 IsUnionTypeNode

func IsUnionTypeNode(node *Node) bool

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 IsVariableDeclarationInitializedToBareOrAccessedRequire

func IsVariableDeclarationInitializedToBareOrAccessedRequire(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 IsVariableParameterOrProperty

func IsVariableParameterOrProperty(node *Node) bool

func IsVariableStatement

func IsVariableStatement(node *Node) bool

func IsVoidExpression

func IsVoidExpression(node *Node) bool

func IsVoidZero

func IsVoidZero(node *Node) bool

func IsWhileStatement

func IsWhileStatement(node *Node) bool

func IsWhitespaceOnlyJsxText

func IsWhitespaceOnlyJsxText(node *Node) bool

func IsWithStatement

func IsWithStatement(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 NodeCanBeDecorated

func NodeCanBeDecorated(useLegacyDecorators bool, node *Node, parent *Node, grandparent *Node) bool

func NodeHasKind

func NodeHasKind(node *Node, kind Kind) bool

func NodeHasName

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

func NodeIsDecorated

func NodeIsDecorated(useLegacyDecorators bool, node *Node, parent *Node, grandparent *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 NodeOrChildIsDecorated

func NodeOrChildIsDecorated(useLegacyDecorators bool, node *Node, parent *Node, grandparent *Node) 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 SetParseJSDocForNode

func SetParseJSDocForNode(fn func(*SourceFile, *Node) []*Node)

SetParseJSDocForNode registers the lazy JSDoc parse function. Called from parser's init().

func ShouldTransformImportCall

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

func SymbolName

func SymbolName(symbol *Symbol) string

func TagNamesAreEquivalent

func TagNamesAreEquivalent(lhs *Expression, rhs *Expression) bool

func TryGetTextOfPropertyName

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

Types

type AbstractKeyword

type AbstractKeyword = Node

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 AccessorKeyword

type AccessorKeyword = Node

type AdditiveOperator

type AdditiveOperator = Kind // KindPlusToken | KindMinusToken

type AdditiveOperatorOrHigher

type AdditiveOperatorOrHigher = Kind // KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken

type AllAccessorDeclarations

type AllAccessorDeclarations struct {
	FirstAccessor  *AccessorDeclaration
	SecondAccessor *AccessorDeclaration
	SetAccessor    *SetAccessorDeclaration
	GetAccessor    *GetAccessorDeclaration
}

func GetAllAccessorDeclarations

func GetAllAccessorDeclarations(parentDeclarations []*Node, accessor *AccessorDeclaration) AllAccessorDeclarations

func GetAllAccessorDeclarationsForDeclaration

func GetAllAccessorDeclarationsForDeclaration(accessor *AccessorDeclaration, declarationsOfSymbol []*Node) AllAccessorDeclarations

type AnyImportOrRequireStatement

type AnyImportOrRequireStatement = Node // AnyImportSyntax | RequireVariableStatement

type AnyImportSyntax

type AnyImportSyntax = Node // ImportDeclaration | ImportEqualsDeclaration

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 ArrayBindingElement

type ArrayBindingElement = Node // BindingElement | OmittedExpression

type ArrayDestructuringAssignment

type ArrayDestructuringAssignment = Node // BinaryExpression

type ArrayLiteralExpression

type ArrayLiteralExpression struct {
	PrimaryExpressionBase
	CompositeBase
	Elements  *ElementList
	MultiLine bool
}

func (*ArrayLiteralExpression) Clone

func (*ArrayLiteralExpression) ForEachChild

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

func (*ArrayLiteralExpression) VisitEachChild

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

type ArrayLiteralExpressionNode

type ArrayLiteralExpressionNode = Node

type ArrayTypeNode

type ArrayTypeNode struct {
	TypeNodeBase
	ElementType *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 ArrayTypeNodeNode

type ArrayTypeNodeNode = Node

type ArrowFunction

func (*ArrowFunction) Clone

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

func (*ArrowFunction) ForEachChild

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

func (*ArrowFunction) VisitEachChild

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

type ArrowFunctionNode

type ArrowFunctionNode = Node

type AsExpression

type AsExpression struct {
	ExpressionBase
	Expression *Expression
	Type       *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 AsExpressionNode

type AsExpressionNode = Node

type AssertKeyword

type AssertKeyword = Node

type AssertionExpression

type AssertionExpression = Node // TypeAssertion | AsExpression

type AssertsKeyword

type AssertsKeyword = Node

type AssignmentOperator

type AssignmentOperator = Kind // KindEqualsToken | KindPlusEqualsToken | KindMinusEqualsToken | KindAsteriskAsteriskEqualsToken | KindAsteriskEqualsToken | KindSlashEqualsToken | KindPercentEqualsToken | KindAmpersandEqualsToken | KindBarEqualsToken | KindCaretEqualsToken | KindLessThanLessThanEqualsToken | KindGreaterThanGreaterThanGreaterThanEqualsToken | KindGreaterThanGreaterThanEqualsToken | KindBarBarEqualsToken | KindAmpersandAmpersandEqualsToken | KindQuestionQuestionEqualsToken

type AssignmentOperatorOrHigher

type AssignmentOperatorOrHigher = Kind // KindQuestionQuestionToken | KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken | KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken | KindLessThanToken | KindLessThanEqualsToken | KindGreaterThanToken | KindGreaterThanEqualsToken | KindInstanceOfKeyword | KindInKeyword | KindEqualsEqualsToken | KindEqualsEqualsEqualsToken | KindExclamationEqualsEqualsToken | KindExclamationEqualsToken | KindAmpersandToken | KindBarToken | KindCaretToken | KindAmpersandAmpersandToken | KindBarBarToken | KindEqualsToken | KindPlusEqualsToken | KindMinusEqualsToken | KindAsteriskAsteriskEqualsToken | KindAsteriskEqualsToken | KindSlashEqualsToken | KindPercentEqualsToken | KindAmpersandEqualsToken | KindBarEqualsToken | KindCaretEqualsToken | KindLessThanLessThanEqualsToken | KindGreaterThanGreaterThanGreaterThanEqualsToken | KindGreaterThanGreaterThanEqualsToken | KindBarBarEqualsToken | KindAmpersandAmpersandEqualsToken | KindQuestionQuestionEqualsToken

type AssignmentOperatorToken

type AssignmentOperatorToken = Node

type AsteriskToken

type AsteriskToken = Node

type AsyncKeyword

type AsyncKeyword = Node

type AwaitExpression

type AwaitExpression struct {
	UnaryExpressionBase
	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 AwaitExpressionNode

type AwaitExpressionNode = Node

type AwaitKeyword

type AwaitKeyword = Node

type BigIntLiteral

type BigIntLiteral struct {
	LiteralExpressionBase
}

func (*BigIntLiteral) Clone

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

type BigIntLiteralNode

type BigIntLiteralNode = Node

type BinaryExpression

type BinaryExpression struct {
	ExpressionBase
	DeclarationBase
	ModifiersBase
	CompositeBase
	Left          *Expression
	Type          *TypeNode // Optional
	OperatorToken *BinaryOperatorToken
	Right         *Expression
}

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 BinaryExpressionNode

type BinaryExpressionNode = Node

type BinaryOperator

type BinaryOperator = Kind // KindQuestionQuestionToken | KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken | KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken | KindLessThanToken | KindLessThanEqualsToken | KindGreaterThanToken | KindGreaterThanEqualsToken | KindInstanceOfKeyword | KindInKeyword | KindEqualsEqualsToken | KindEqualsEqualsEqualsToken | KindExclamationEqualsEqualsToken | KindExclamationEqualsToken | KindAmpersandToken | KindBarToken | KindCaretToken | KindAmpersandAmpersandToken | KindBarBarToken | KindEqualsToken | KindPlusEqualsToken | KindMinusEqualsToken | KindAsteriskAsteriskEqualsToken | KindAsteriskEqualsToken | KindSlashEqualsToken | KindPercentEqualsToken | KindAmpersandEqualsToken | KindBarEqualsToken | KindCaretEqualsToken | KindLessThanLessThanEqualsToken | KindGreaterThanGreaterThanGreaterThanEqualsToken | KindGreaterThanGreaterThanEqualsToken | KindBarBarEqualsToken | KindAmpersandAmpersandEqualsToken | KindQuestionQuestionEqualsToken | KindCommaToken

type BinaryOperatorToken

type BinaryOperatorToken = Node

type BindingElement

type BindingElement struct {
	NodeBase
	DeclarationBase
	ExportableBase
	FlowNodeBase
	CompositeBase
	DotDotDotToken *DotDotDotToken // Optional
	PropertyName   *PropertyName   // Optional

	Initializer *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
	CompositeBase
	Elements *BindingElementList
}

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 BitwiseOperator

type BitwiseOperator = Kind // KindAmpersandToken | KindBarToken | KindCaretToken

type BitwiseOperatorOrHigher

type BitwiseOperatorOrHigher = Kind // KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken | KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken | KindLessThanToken | KindLessThanEqualsToken | KindGreaterThanToken | KindGreaterThanEqualsToken | KindInstanceOfKeyword | KindInKeyword | KindEqualsEqualsToken | KindEqualsEqualsEqualsToken | KindExclamationEqualsEqualsToken | KindExclamationEqualsToken | KindAmpersandToken | KindBarToken | KindCaretToken

type Block

type Block struct {
	StatementBase
	LocalsContainerBase
	CompositeBase
	Statements *StatementList
	MultiLine  bool
}

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 *AsteriskToken // Optional
	Body          *NodeBody      // Optional
	EndFlowNode   *FlowNode
}

func (*BodyBase) BodyData

func (node *BodyBase) BodyData() *BodyBase

type BooleanLiteral

type BooleanLiteral = Node // TrueLiteral | FalseLiteral

type BreakOrContinueStatement

type BreakOrContinueStatement = Node // BreakStatement | ContinueStatement

type BreakStatement

type BreakStatement struct {
	StatementBase
	Label *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 BreakStatementNode

type BreakStatementNode = Node

type CallExpression

type CallExpression struct {
	LeftHandSideExpressionBase
	DeclarationBase
	CompositeBase
	Expression       *Expression
	QuestionDotToken *QuestionDotToken // Optional
	TypeArguments    *TypeList         // Optional
	Arguments        *ElementList
}

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 CallExpressionNode

type CallExpressionNode = Node

type CallLikeExpression

type CallLikeExpression = Node // CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement | BinaryExpression

type CallOrNewExpression

type CallOrNewExpression = Node // CallExpression | NewExpression

type CallSignatureDeclaration

type CallSignatureDeclaration struct {
	NodeBase
	DeclarationBase
	FunctionLikeBase
	TypeElementBase
	TypeSyntaxBase
}

func (*CallSignatureDeclaration) Clone

func (*CallSignatureDeclaration) ForEachChild

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

func (*CallSignatureDeclaration) VisitEachChild

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

type CallSignatureDeclarationNode

type CallSignatureDeclarationNode = Node

type CaseBlock

type CaseBlock struct {
	NodeBase
	LocalsContainerBase
	CompositeBase
	Clauses *CaseClausesList
}

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 CaseClausesList

type CaseClausesList = NodeList // NodeList[*CaseOrDefaultClause]

type CaseKeyword

type CaseKeyword = Node

type CaseOrDefaultClause

type CaseOrDefaultClause struct {
	NodeBase
	CompositeBase
	Expression          *Expression
	Statements          *StatementList
	FallthroughFlowNode *FlowNode
}

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
	CompositeBase
	VariableDeclaration *VariableDeclarationNode // Optional
	Block               *BlockNode
}

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
	CheckFlagsIndexSymbol            CheckFlags = 1 << 23 // Synthetic property created from index signature
	CheckFlagsSynthetic                         = CheckFlagsSyntheticProperty | CheckFlagsSyntheticMethod
	CheckFlagsNonUniformAndLiteral              = CheckFlagsHasNonUniformType | CheckFlagsHasLiteralType
	CheckFlagsPartial                           = CheckFlagsReadPartial | CheckFlagsWritePartial
)

type CheckJsDirective

type CheckJsDirective struct {
	Enabled bool
	Range   CommentRange
}

type ClassDeclaration

type ClassDeclaration struct {
	DeclarationBase
	StatementBase
	ClassLikeBase
}

func (*ClassDeclaration) Clone

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

func (*ClassDeclaration) ForEachChild

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

func (*ClassDeclaration) Name

func (node *ClassDeclaration) Name() *DeclarationName

func (*ClassDeclaration) VisitEachChild

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

type ClassDeclarationNode

type ClassDeclarationNode = 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 {
	PrimaryExpressionBase
	ClassLikeBase
}

func (*ClassExpression) Clone

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

func (*ClassExpression) ForEachChild

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

func (*ClassExpression) Name

func (node *ClassExpression) Name() *DeclarationName

func (*ClassExpression) VisitEachChild

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

type ClassExpressionNode

type ClassExpressionNode = Node

type ClassLikeBase

type ClassLikeBase struct {
	DeclarationBase
	ExportableBase
	ModifiersBase
	LocalsContainerBase
	CompositeBase

	TypeParameters  *TypeParameterList  // Optional
	HeritageClauses *HeritageClauseList // Optional
	Members         *ClassElementList
	// contains filtered or unexported fields
}

func (*ClassLikeBase) ClassLikeData

func (node *ClassLikeBase) ClassLikeData() *ClassLikeBase

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
	CompositeBase
	Body           *BlockNode
	ReturnFlowNode *FlowNode
}

func (*ClassStaticBlockDeclaration) Clone

func (*ClassStaticBlockDeclaration) ForEachChild

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

func (*ClassStaticBlockDeclaration) VisitEachChild

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

type ClassStaticBlockDeclarationNode

type ClassStaticBlockDeclarationNode = Node

type ColonToken

type ColonToken = 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 CommonJSExportNode

type CommonJSExportNode = Node

type CompositeBase

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

type CompoundAssignmentOperator

type CompoundAssignmentOperator = Kind // KindPlusEqualsToken | KindMinusEqualsToken | KindAsteriskAsteriskEqualsToken | KindAsteriskEqualsToken | KindSlashEqualsToken | KindPercentEqualsToken | KindAmpersandEqualsToken | KindBarEqualsToken | KindCaretEqualsToken | KindLessThanLessThanEqualsToken | KindGreaterThanGreaterThanGreaterThanEqualsToken | KindGreaterThanGreaterThanEqualsToken | KindBarBarEqualsToken | KindAmpersandAmpersandEqualsToken | KindQuestionQuestionEqualsToken

type ComputedPropertyName

type ComputedPropertyName struct {
	NodeBase
	CompositeBase
	Expression *Expression
}

func (*ComputedPropertyName) Clone

func (*ComputedPropertyName) ForEachChild

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

func (*ComputedPropertyName) VisitEachChild

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

type ComputedPropertyNameNode

type ComputedPropertyNameNode = Node

type ConciseBody

type ConciseBody = Node // Block | Expression

type ConditionalExpression

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

func (*ConditionalExpression) Clone

func (*ConditionalExpression) ForEachChild

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

func (*ConditionalExpression) VisitEachChild

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

type ConditionalExpressionNode

type ConditionalExpressionNode = Node

type ConditionalTypeNode

type ConditionalTypeNode struct {
	TypeNodeBase
	LocalsContainerBase
	CheckType   *TypeNode
	ExtendsType *TypeNode
	TrueType    *TypeNode
	FalseType   *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 ConditionalTypeNodeNode

type ConditionalTypeNodeNode = Node

type ConstKeyword

type ConstKeyword = Node

type ConstructSignatureDeclaration

type ConstructSignatureDeclaration struct {
	NodeBase
	DeclarationBase
	FunctionLikeBase
	TypeElementBase
	TypeSyntaxBase
}

func (*ConstructSignatureDeclaration) Clone

func (*ConstructSignatureDeclaration) ForEachChild

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

func (*ConstructSignatureDeclaration) VisitEachChild

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

type ConstructSignatureDeclarationNode

type ConstructSignatureDeclarationNode = Node

type ConstructorDeclaration

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 {
	TypeNodeBase
	FunctionOrConstructorTypeNodeBase
}

func (*ConstructorTypeNode) Clone

func (*ConstructorTypeNode) ForEachChild

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

func (*ConstructorTypeNode) VisitEachChild

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

type ConstructorTypeNodeNode

type ConstructorTypeNodeNode = Node

type ContinueStatement

type ContinueStatement struct {
	StatementBase
	Label *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 ContinueStatementNode

type ContinueStatementNode = Node

type DebuggerStatement

type DebuggerStatement struct {
	StatementBase
}

func (*DebuggerStatement) Clone

type DebuggerStatementNode

type DebuggerStatementNode = Node

type Declaration

type Declaration = Node // Node with DeclarationBase

func GetDeclarationFromName

func GetDeclarationFromName(name *Node) *Declaration

type DeclarationBase

type DeclarationBase struct {
	Symbol *Symbol
}

func (*DeclarationBase) DeclarationData

func (node *DeclarationBase) DeclarationData() *DeclarationBase

type DeclarationName

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

type DeclareKeyword

type DeclareKeyword = Node

type Decorator

type Decorator struct {
	NodeBase
	CompositeBase
	Expression *LeftHandSideExpression
}

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 DecoratorNode

type DecoratorNode = Node

type DefaultKeyword

type DefaultKeyword = Node

type DeleteExpression

type DeleteExpression struct {
	UnaryExpressionBase
	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 DeleteExpressionNode

type DeleteExpressionNode = Node

type DestructuringAssignment

type DestructuringAssignment = Node // ObjectDestructuringAssignment | ArrayDestructuringAssignment

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 NewDiagnosticFromSerialized

func NewDiagnosticFromSerialized(
	file *SourceFile,
	loc core.TextRange,
	code int32,
	category diagnostics.Category,
	messageKey diagnostics.Key,
	messageArgs []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) Localize

func (d *Diagnostic) Localize(locale locale.Locale) string

func (*Diagnostic) MessageArgs

func (d *Diagnostic) MessageArgs() []string

func (*Diagnostic) MessageChain

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

func (*Diagnostic) MessageKey

func (d *Diagnostic) MessageKey() diagnostics.Key

func (*Diagnostic) Pos

func (d *Diagnostic) Pos() int

func (*Diagnostic) RelatedInformation

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

func (*Diagnostic) RepopulateInfo

func (d *Diagnostic) RepopulateInfo() *RepopulateDiagnosticInfo

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

func (d *Diagnostic) SetRepopulateInfo(info *RepopulateDiagnosticInfo)

func (*Diagnostic) SetSkippedOnNoEmit

func (d *Diagnostic) SetSkippedOnNoEmit()

func (*Diagnostic) SkippedOnNoEmit

func (d *Diagnostic) SkippedOnNoEmit() bool

func (*Diagnostic) String

func (d *Diagnostic) String() string

For debugging only.

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 {
	IterationStatementBase
	CompositeBase
	Expression *Expression
}

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 DoStatementNode

type DoStatementNode = Node

type DotDotDotToken

type DotDotDotToken = Node

type DotToken

type DotToken = Node

type ElementAccessExpression

type ElementAccessExpression struct {
	MemberExpressionBase
	FlowNodeBase
	CompositeBase
	Expression         *Expression
	QuestionDotToken   *QuestionDotToken // Optional
	ArgumentExpression *Expression
}

func (*ElementAccessExpression) Clone

func (*ElementAccessExpression) ForEachChild

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

func (*ElementAccessExpression) VisitEachChild

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

type ElementAccessExpressionNode

type ElementAccessExpressionNode = 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 EmptyStatementNode

type EmptyStatementNode = Node

type EndOfFile

type EndOfFile = Node

type EntityName

type EntityName = Node // Identifier | QualifiedName

type EnumDeclaration

type EnumDeclaration struct {
	DeclarationBase
	StatementBase
	ExportableBase
	ModifiersBase
	CompositeBase

	Members *EnumMemberList
	// 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
	CompositeBase
	Initializer *Expression // Optional
}

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 EqualityOperator

type EqualityOperator = Kind // KindEqualsEqualsToken | KindEqualsEqualsEqualsToken | KindExclamationEqualsEqualsToken | KindExclamationEqualsToken

type EqualityOperatorOrHigher

type EqualityOperatorOrHigher = Kind // KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken | KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken | KindLessThanToken | KindLessThanEqualsToken | KindGreaterThanToken | KindGreaterThanEqualsToken | KindInstanceOfKeyword | KindInKeyword | KindEqualsEqualsToken | KindEqualsEqualsEqualsToken | KindExclamationEqualsEqualsToken | KindExclamationEqualsToken

type EqualsGreaterThanToken

type EqualsGreaterThanToken = Node

type EqualsToken

type EqualsToken = Node

type ExclamationToken

type ExclamationToken = Node

type ExponentiationOperator

type ExponentiationOperator = Kind // KindAsteriskAsteriskToken

type ExportAssignment

type ExportAssignment struct {
	DeclarationBase
	StatementBase
	ModifiersBase
	CompositeBase
	IsExportEquals bool
	Type           *TypeNode
	Expression     *Expression
}

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 ExportAssignmentNode

type ExportAssignmentNode = Node

type ExportDeclaration

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

func (*ExportDeclaration) Clone

func (*ExportDeclaration) ForEachChild

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

func (*ExportDeclaration) VisitEachChild

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

type ExportDeclarationNode

type ExportDeclarationNode = Node

type ExportKeyword

type ExportKeyword = Node

type ExportSpecifier

type ExportSpecifier struct {
	NodeBase
	DeclarationBase
	ExportableBase
	CompositeBase
	IsTypeOnly   bool
	PropertyName *ModuleExportName // Optional
	// 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
}

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
}

func (*ExpressionStatement) Clone

func (*ExpressionStatement) ForEachChild

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

func (*ExpressionStatement) VisitEachChild

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

type ExpressionStatementNode

type ExpressionStatementNode = Node

type ExpressionWithTypeArguments

type ExpressionWithTypeArguments struct {
	MemberExpressionBase
	CompositeBase
	Expression    *Expression
	TypeArguments *TypeList // Optional
}

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 {
	JSX   bool
	Force bool
}

func GetExternalModuleIndicatorOptions

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

type ExternalModuleReference

type ExternalModuleReference struct {
	NodeBase
	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 ExternalModuleReferenceNode

type ExternalModuleReferenceNode = Node

type FalseLiteral

type FalseLiteral = 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
	CompositeBase
	AwaitModifier *AwaitKeyword // Optional
	Initializer   *ForInitializer
	Expression    *Expression
	Statement     *Statement
}

func (*ForInOrOfStatement) Clone

func (*ForInOrOfStatement) ForEachChild

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

func (*ForInOrOfStatement) VisitEachChild

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

type ForInOrOfStatementNode

type ForInOrOfStatementNode = Node

type ForInitializer

type ForInitializer = Node // Expression | MissingDeclaration | VariableDeclarationList

type ForStatement

type ForStatement struct {
	IterationStatementBase
	LocalsContainerBase
	CompositeBase
	Initializer *ForInitializer // Optional
	Condition   *Expression     // Optional
	Incrementor *Expression     // Optional
}

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 ForStatementNode

type ForStatementNode = Node

type FunctionBody

type FunctionBody = Node // Block

type FunctionDeclaration

type FunctionDeclaration struct {
	DeclarationBase
	StatementBase
	ExportableBase
	ModifiersBase
	FunctionLikeWithBodyBase
	CompositeBase

	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 {
	PrimaryExpressionBase
	DeclarationBase
	ModifiersBase
	FunctionLikeWithBodyBase
	FlowNodeBase
	CompositeBase

	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 FunctionExpressionNode

type FunctionExpressionNode = Node

type FunctionFlags

type FunctionFlags uint32
const (
	FunctionFlagsNormal         FunctionFlags = 0
	FunctionFlagsGenerator      FunctionFlags = 1 << 0
	FunctionFlagsAsync          FunctionFlags = 1 << 1
	FunctionFlagsInvalid        FunctionFlags = 1 << 2
	FunctionFlagsAsyncGenerator FunctionFlags = FunctionFlagsAsync | FunctionFlagsGenerator
)

func GetFunctionFlags

func GetFunctionFlags(node *Node) FunctionFlags

type FunctionLikeBase

type FunctionLikeBase struct {
	DeclarationBase
	LocalsContainerBase
	TypeParameters *TypeParameterList // Optional
	Parameters     *ParameterList
	Type           *TypeNode // Optional
	FullSignature  *TypeNode // Optional
}

func (*FunctionLikeBase) FunctionLikeData

func (node *FunctionLikeBase) FunctionLikeData() *FunctionLikeBase

func (*FunctionLikeBase) LocalsContainerData

func (node *FunctionLikeBase) LocalsContainerData() *LocalsContainerBase

type FunctionLikeDeclaration

type FunctionLikeDeclaration = Node // FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction

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
	ModifiersBase
	FunctionLikeBase
}

func (*FunctionOrConstructorTypeNodeBase) DeclarationData

func (node *FunctionOrConstructorTypeNodeBase) DeclarationData() *DeclarationBase

type FunctionTypeNode

type FunctionTypeNode struct {
	TypeNodeBase
	FunctionOrConstructorTypeNodeBase
}

func (*FunctionTypeNode) Clone

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

func (*FunctionTypeNode) ForEachChild

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

func (*FunctionTypeNode) VisitEachChild

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

type FunctionTypeNodeNode

type FunctionTypeNodeNode = Node

type GetAccessorDeclaration

type GetAccessorDeclaration struct {
	AccessorDeclarationBase
}

func (*GetAccessorDeclaration) Clone

func (*GetAccessorDeclaration) ForEachChild

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

func (*GetAccessorDeclaration) Name

func (*GetAccessorDeclaration) VisitEachChild

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

type GetAccessorDeclarationNode

type GetAccessorDeclarationNode = 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
	CompositeBase
	Token Kind
	Types *ExpressionWithTypeArgumentsList
}

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 {
	PrimaryExpressionBase
	FlowNodeBase
	Text string
}

func (*Identifier) Clone

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

type IdentifierNode

type IdentifierNode = Node

type IfStatement

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

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 IfStatementNode

type IfStatementNode = Node

type ImportAttribute

type ImportAttribute struct {
	NodeBase
	CompositeBase

	Value *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() *DeclarationName

func (*ImportAttribute) VisitEachChild

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

type ImportAttributeList

type ImportAttributeList = NodeList // NodeList[*ImportAttribute]

type ImportAttributeName

type ImportAttributeName = Node // Identifier | StringLiteral

type ImportAttributeNode

type ImportAttributeNode = Node

type ImportAttributes

type ImportAttributes struct {
	NodeBase
	CompositeBase
	Token      Kind
	Attributes *ImportAttributeList
	MultiLine  bool
}

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
	CompositeBase
	PhaseModifier ImportPhaseModifierSyntaxKind // Optional

	NamedBindings *NamedImportBindings // Optional
	// contains filtered or unexported fields
}

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 ImportClauseOrBindingPattern

type ImportClauseOrBindingPattern = Node // ImportClause | BindingPattern

type ImportDeclaration

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

func (*ImportDeclaration) Clone

func (*ImportDeclaration) ForEachChild

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

func (*ImportDeclaration) VisitEachChild

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

type ImportDeclarationNode

type ImportDeclarationNode = Node

type ImportEqualsDeclaration

type ImportEqualsDeclaration struct {
	DeclarationBase
	StatementBase
	ExportableBase
	ModifiersBase
	CompositeBase
	IsTypeOnly bool

	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 ImportEqualsDeclarationNode

type ImportEqualsDeclarationNode = Node

type ImportExpression

type ImportExpression = Node

type ImportPhaseModifierSyntaxKind

type ImportPhaseModifierSyntaxKind = Kind // KindTypeKeyword | KindDeferKeyword

type ImportSpecifier

type ImportSpecifier struct {
	NodeBase
	DeclarationBase
	ExportableBase
	CompositeBase
	IsTypeOnly   bool
	PropertyName *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 {
	NodeWithTypeArgumentsBase
	IsTypeOf   bool
	Argument   *TypeNode
	Attributes *ImportAttributesNode // Optional
	Qualifier  *EntityName           // 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 ImportTypeNodeNode

type ImportTypeNodeNode = Node

type InKeyword

type InKeyword = Node

type IncrementExpression

type IncrementExpression = Node // UpdateExpressionBase

type IndexSignatureDeclaration

func (*IndexSignatureDeclaration) Clone

func (*IndexSignatureDeclaration) ForEachChild

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

func (*IndexSignatureDeclaration) VisitEachChild

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

type IndexSignatureDeclarationNode

type IndexSignatureDeclarationNode = Node

type IndexedAccessTypeNode

type IndexedAccessTypeNode struct {
	TypeNodeBase
	ObjectType *TypeNode
	IndexType  *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 IndexedAccessTypeNodeNode

type IndexedAccessTypeNodeNode = Node

type InferTypeNode

type InferTypeNode struct {
	TypeNodeBase
	TypeParameter *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 InferTypeNodeNode

type InferTypeNodeNode = Node

type InterfaceDeclaration

type InterfaceDeclaration struct {
	DeclarationBase
	StatementBase
	ExportableBase
	ModifiersBase
	TypeSyntaxBase

	TypeParameters  *TypeParameterList  // Optional
	HeritageClauses *HeritageClauseList // Optional
	Members         *TypeElementList
	// 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 InterfaceDeclarationNode

type InterfaceDeclarationNode = Node

type IntersectionTypeNode

type IntersectionTypeNode struct {
	TypeNodeBase
	UnionOrIntersectionTypeNodeBase
}

func (*IntersectionTypeNode) Clone

func (*IntersectionTypeNode) ForEachChild

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

func (*IntersectionTypeNode) VisitEachChild

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

type IntersectionTypeNodeNode

type IntersectionTypeNodeNode = Node

type IterationStatementBase

type IterationStatementBase struct {
	StatementBase
	Statement *Statement
}

type JSDeclarationKind

type JSDeclarationKind int
const (
	JSDeclarationKindNone JSDeclarationKind = iota
	// module.exports = expr
	JSDeclarationKindModuleExports
	// exports.name = expr
	// module.exports.name = expr
	JSDeclarationKindExportsProperty
	// this.name = expr
	JSDeclarationKindThisProperty
	// F.name = expr, F[name] = expr, in JS or TS file
	JSDeclarationKindProperty
	// Object.defineProperty(x, 'name', { value: any, writable?: boolean (false by default) });
	// Object.defineProperty(x, 'name', { get: Function, set: Function });
	// Object.defineProperty(x, 'name', { get: Function });
	// Object.defineProperty(x, 'name', { set: Function });
	JSDeclarationKindObjectDefinePropertyValue
	// Object.defineProperty(exports || module.exports, 'name', ...);
	JSDeclarationKindObjectDefinePropertyExports
)

func GetAssignmentDeclarationKind

func GetAssignmentDeclarationKind(node *Node) JSDeclarationKind

type JSDoc

type JSDoc struct {
	NodeBase
	Comment *NodeList
	Tags    *NodeList // Optional
}

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 {
	JSDocTypeBase
}

func (*JSDocAllType) Clone

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

type JSDocAllTypeNode

type JSDocAllTypeNode = Node

type JSDocAugmentsTag

type JSDocAugmentsTag struct {
	JSDocTagBase
	ClassName *ExpressionWithTypeArgumentsNode
}

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 JSDocAugmentsTagNode

type JSDocAugmentsTagNode = Node

type JSDocCallbackTag

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

func (*JSDocCallbackTag) Clone

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

func (*JSDocCallbackTag) ForEachChild

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

func (*JSDocCallbackTag) VisitEachChild

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

type JSDocCallbackTagNode

type JSDocCallbackTagNode = 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
}

func (*JSDocDeprecatedTag) Clone

func (*JSDocDeprecatedTag) ForEachChild

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

func (*JSDocDeprecatedTag) VisitEachChild

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

type JSDocDeprecatedTagNode

type JSDocDeprecatedTagNode = Node

type JSDocImplementsTag

type JSDocImplementsTag struct {
	JSDocTagBase
	ClassName *ExpressionWithTypeArgumentsNode
}

func (*JSDocImplementsTag) Clone

func (*JSDocImplementsTag) ForEachChild

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

func (*JSDocImplementsTag) VisitEachChild

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

type JSDocImplementsTagNode

type JSDocImplementsTagNode = Node

type JSDocImportTag

type JSDocImportTag struct {
	JSDocTagBase
	ImportClause    *ImportClauseNode // Optional
	ModuleSpecifier *Expression
	Attributes      *ImportAttributesNode // Optional
}

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 JSDocImportTagNode

type JSDocImportTagNode = 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 JSDocLinkCodeNode

type JSDocLinkCodeNode = Node

type JSDocLinkNode

type JSDocLinkNode = 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 JSDocLinkPlainNode

type JSDocLinkPlainNode = Node

type JSDocNameReference

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

func (*JSDocNameReference) Clone

func (*JSDocNameReference) ForEachChild

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

func (*JSDocNameReference) Name

func (node *JSDocNameReference) Name() *DeclarationName

func (*JSDocNameReference) VisitEachChild

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

type JSDocNameReferenceNode

type JSDocNameReferenceNode = Node

type JSDocNode

type JSDocNode = Node

type JSDocNodeSyntaxKind

type JSDocNodeSyntaxKind = Kind // KindJSDocTypeExpression | KindJSDocNameReference | KindJSDocAllType | KindJSDocNullableType | KindJSDocNonNullableType | KindJSDocOptionalType | KindJSDocVariadicType | KindJSDoc | KindJSDocText | KindJSDocTypeLiteral | KindJSDocSignature | KindJSDocLink | KindJSDocLinkCode | KindJSDocLinkPlain | KindJSDocUnknownTag | KindJSDocAugmentsTag | KindJSDocImplementsTag | KindJSDocDeprecatedTag | KindJSDocPublicTag | KindJSDocPrivateTag | KindJSDocProtectedTag | KindJSDocReadonlyTag | KindJSDocOverrideTag | KindJSDocCallbackTag | KindJSDocOverloadTag | KindJSDocParameterTag | KindJSDocReturnTag | KindJSDocThisTag | KindJSDocTypeTag | KindJSDocTemplateTag | KindJSDocTypedefTag | KindJSDocSeeTag | KindJSDocPropertyTag | KindJSDocThrowsTag | KindJSDocSatisfiesTag | KindJSDocImportTag

type JSDocNonNullableType

type JSDocNonNullableType struct {
	JSDocTypeBase
	Type *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 JSDocNonNullableTypeNode

type JSDocNonNullableTypeNode = Node

type JSDocNullableType

type JSDocNullableType struct {
	JSDocTypeBase
	Type *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 JSDocNullableTypeNode

type JSDocNullableTypeNode = Node

type JSDocOptionalType

type JSDocOptionalType struct {
	JSDocTypeBase
	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 JSDocOptionalTypeNode

type JSDocOptionalTypeNode = Node

type JSDocOverloadTag

type JSDocOverloadTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

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 JSDocOverloadTagNode

type JSDocOverloadTagNode = Node

type JSDocOverrideTag

type JSDocOverrideTag struct {
	JSDocTagBase
}

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 JSDocOverrideTagNode

type JSDocOverrideTagNode = Node

type JSDocParameterOrPropertyTag

type JSDocParameterOrPropertyTag struct {
	JSDocTagBase

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

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 JSDocParameterOrPropertyTagNode

type JSDocParameterOrPropertyTagNode = Node

type JSDocPrivateTag

type JSDocPrivateTag struct {
	JSDocTagBase
}

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 JSDocPrivateTagNode

type JSDocPrivateTagNode = Node

type JSDocProtectedTag

type JSDocProtectedTag struct {
	JSDocTagBase
}

func (*JSDocProtectedTag) Clone

func (*JSDocProtectedTag) ForEachChild

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

func (*JSDocProtectedTag) VisitEachChild

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

type JSDocProtectedTagNode

type JSDocProtectedTagNode = Node

type JSDocPublicTag

type JSDocPublicTag struct {
	JSDocTagBase
}

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 JSDocPublicTagNode

type JSDocPublicTagNode = Node

type JSDocReadonlyTag

type JSDocReadonlyTag struct {
	JSDocTagBase
}

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 JSDocReadonlyTagNode

type JSDocReadonlyTagNode = Node

type JSDocReturnTag

type JSDocReturnTag struct {
	JSDocTagBase
	TypeExpression *TypeNode // Optional
}

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 JSDocReturnTagNode

type JSDocReturnTagNode = Node

type JSDocSatisfiesTag

type JSDocSatisfiesTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

func (*JSDocSatisfiesTag) Clone

func (*JSDocSatisfiesTag) ForEachChild

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

func (*JSDocSatisfiesTag) VisitEachChild

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

type JSDocSatisfiesTagNode

type JSDocSatisfiesTagNode = Node

type JSDocSeeTag

type JSDocSeeTag struct {
	JSDocTagBase
	NameExpression *TypeNode
}

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 JSDocSeeTagNode

type JSDocSeeTagNode = Node

type JSDocSignature

type JSDocSignature struct {
	JSDocTypeBase
	FunctionLikeBase
}

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 JSDocSignatureNode

type JSDocSignatureNode = Node

type JSDocTag

type JSDocTag = Node // Node with JSDocTagBase

type JSDocTagBase

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

type JSDocTemplateTag

type JSDocTemplateTag struct {
	JSDocTagBase
	Constraint     *Node
	TypeParameters *TypeParameterList
}

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 JSDocTemplateTagNode

type JSDocTemplateTagNode = Node

type JSDocText

type JSDocText struct {
	JSDocCommentBase
}

func (*JSDocText) Clone

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

type JSDocTextNode

type JSDocTextNode = Node

type JSDocThisTag

type JSDocThisTag struct {
	JSDocTagBase
	TypeExpression *TypeNode
}

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 JSDocThisTagNode

type JSDocThisTagNode = Node

type JSDocThrowsTag

type JSDocThrowsTag struct {
	JSDocTagBase
	TypeExpression *TypeNode // Optional
}

func (*JSDocThrowsTag) Clone

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

func (*JSDocThrowsTag) ForEachChild

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

func (*JSDocThrowsTag) VisitEachChild

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

type JSDocThrowsTagNode

type JSDocThrowsTagNode = Node

type JSDocTypeBase

type JSDocTypeBase struct {
	TypeNodeBase
}

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 JSDocTypeExpressionNode

type JSDocTypeExpressionNode = Node

type JSDocTypeLiteral

type JSDocTypeLiteral struct {
	JSDocTypeBase
	DeclarationBase
	JSDocPropertyTags []*Node // Optional
	IsArrayType       bool
}

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 JSDocTypeLiteralNode

type JSDocTypeLiteralNode = Node

type JSDocTypeTag

type JSDocTypeTag struct {
	JSDocTagBase
	TypeExpression *Node
}

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 JSDocTypeTagNode

type JSDocTypeTagNode = Node

type JSDocTypedefTag

type JSDocTypedefTag struct {
	JSDocTagBase
	TypeExpression *Node // Optional
	// contains filtered or unexported fields
}

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 JSDocTypedefTagNode

type JSDocTypedefTagNode = Node

type JSDocUnknownTag

type JSDocUnknownTag struct {
	JSDocTagBase
}

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 JSDocUnknownTagNode

type JSDocUnknownTagNode = Node

type JSDocVariadicType

type JSDocVariadicType struct {
	JSDocTypeBase
	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 JSDocVariadicTypeNode

type JSDocVariadicTypeNode = Node

type JsxAttribute

type JsxAttribute struct {
	NodeBase
	DeclarationBase
	CompositeBase

	Initializer *JsxAttributeValue // Optional
	// 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() *DeclarationName

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 JsxAttributeNode

type JsxAttributeNode = Node

type JsxAttributeValue

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

type JsxAttributes

type JsxAttributes struct {
	PrimaryExpressionBase
	DeclarationBase
	CompositeBase
	Properties *JsxAttributeList
}

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
}

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 {
	PrimaryExpressionBase
	CompositeBase
	OpeningElement *JsxOpeningElementNode
	Children       *JsxChildList
	ClosingElement *JsxClosingElementNode
}

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 JsxElementNode

type JsxElementNode = Node

type JsxExpression

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

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 JsxExpressionNode

type JsxExpressionNode = Node

type JsxFragment

type JsxFragment struct {
	PrimaryExpressionBase
	CompositeBase
	OpeningFragment *JsxOpeningFragmentNode
	Children        *JsxChildList
	ClosingFragment *JsxClosingFragmentNode
}

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 JsxFragmentNode

type JsxFragmentNode = Node

type JsxNamespacedName

type JsxNamespacedName struct {
	ExpressionBase
	CompositeBase
	Namespace *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 JsxNamespacedNameNode

type JsxNamespacedNameNode = Node

type JsxOpeningElement

type JsxOpeningElement struct {
	ExpressionBase
	CompositeBase
	TagName       *JsxTagNameExpression
	TypeArguments *TypeList // Optional
	Attributes    *JsxAttributesNode
}

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 {
	PrimaryExpressionBase
	CompositeBase
	TagName       *JsxTagNameExpression
	TypeArguments *TypeList // Optional
	Attributes    *JsxAttributesNode
}

func (*JsxSelfClosingElement) Clone

func (*JsxSelfClosingElement) ForEachChild

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

func (*JsxSelfClosingElement) VisitEachChild

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

type JsxSelfClosingElementNode

type JsxSelfClosingElementNode = Node

type JsxSpreadAttribute

type JsxSpreadAttribute struct {
	ObjectLiteralElementBase
	NodeBase
	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 JsxSpreadAttributeNode

type JsxSpreadAttributeNode = Node

type JsxTagNameExpression

type JsxTagNameExpression = Node // Identifier | KeywordExpression | PropertyAccessExpression | JsxNamespacedName

type JsxText

type JsxText struct {
	ExpressionBase
	LiteralLikeNodeBase
	ContainsOnlyTriviaWhiteSpaces bool
}

func (*JsxText) Clone

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

type JsxTextNode

type JsxTextNode = Node

type JsxTokenSyntaxKind

type JsxTokenSyntaxKind = Kind // KindLessThanSlashToken | KindEndOfFile | KindConflictMarkerTrivia | KindJsxText | KindJsxTextAllWhiteSpaces | KindOpenBraceToken | KindLessThanToken

type KeywordExpression

type KeywordExpression struct {
	ExpressionBase
	FlowNodeBase
}

func (*KeywordExpression) Clone

type KeywordExpressionNode

type KeywordExpressionNode = Node

type KeywordExpressionSyntaxKind

type KeywordExpressionSyntaxKind = Kind // KindNullKeyword | KindTrueKeyword | KindFalseKeyword | KindThisKeyword | KindSuperKeyword | KindImportKeyword

type KeywordSyntaxKind

type KeywordSyntaxKind = Kind // 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 | KindImplementsKeyword | KindInterfaceKeyword | KindLetKeyword | KindPackageKeyword | KindPrivateKeyword | KindProtectedKeyword | KindPublicKeyword | KindStaticKeyword | KindYieldKeyword | 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 | KindDeferKeyword

type KeywordTypeNode

type KeywordTypeNode struct {
	TypeNodeBase
}

func (*KeywordTypeNode) Clone

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

type KeywordTypeNodeNode

type KeywordTypeNodeNode = Node

type KeywordTypeSyntaxKind

type KeywordTypeSyntaxKind = Kind // KindAnyKeyword | KindBigIntKeyword | KindBooleanKeyword | KindIntrinsicKeyword | KindNeverKeyword | KindNumberKeyword | KindObjectKeyword | KindStringKeyword | KindSymbolKeyword | KindUndefinedKeyword | KindUnknownKeyword | KindVoidKeyword

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
	KindDeferKeyword // 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
	// JSDoc nodes
	KindJSDocTypeExpression
	KindJSDocNameReference
	KindJSDocAllType // The * type
	KindJSDocNullableType
	KindJSDocNonNullableType
	KindJSDocOptionalType
	KindJSDocVariadicType
	KindJSDoc
	KindJSDocText
	KindJSDocTypeLiteral
	KindJSDocSignature
	KindJSDocLink
	KindJSDocLinkCode
	KindJSDocLinkPlain
	KindJSDocUnknownTag
	KindJSDocAugmentsTag
	KindJSDocImplementsTag
	KindJSDocDeprecatedTag
	KindJSDocPublicTag
	KindJSDocPrivateTag
	KindJSDocProtectedTag
	KindJSDocReadonlyTag
	KindJSDocOverrideTag
	KindJSDocCallbackTag
	KindJSDocOverloadTag
	KindJSDocParameterTag
	KindJSDocReturnTag
	KindJSDocThisTag
	KindJSDocTypeTag
	KindJSDocTemplateTag
	KindJSDocTypedefTag
	KindJSDocSeeTag
	KindJSDocPropertyTag
	KindJSDocThrowsTag
	KindJSDocSatisfiesTag
	KindJSDocImportTag
	// Synthesized list
	KindSyntaxList
	// Reparsed JS nodes
	KindJSTypeAliasDeclaration
	KindJSExportAssignment
	KindCommonJSExport
	KindJSImportDeclaration
	// Transformation nodes
	KindNotEmittedStatement
	KindPartiallyEmittedExpression
	KindSyntheticReferenceExpression
	KindNotEmittedTypeElement
	KindCount
	KindFirstAssignment         = KindEqualsToken
	KindLastAssignment          = KindCaretEqualsToken
	KindFirstCompoundAssignment = KindPlusEqualsToken
	KindLastCompoundAssignment  = KindCaretEqualsToken
	KindFirstReservedWord       = KindBreakKeyword
	KindLastReservedWord        = KindWithKeyword
	KindFirstKeyword            = KindBreakKeyword
	KindLastKeyword             = KindDeferKeyword
	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       = KindJSDocUnknownTag
	KindLastJSDocTagNode        = KindJSDocImportTag
	KindFirstContextualKeyword  = KindAbstractKeyword
	KindLastContextualKeyword   = KindDeferKeyword
	KindLastUnaryOperator       = KindTildeToken
	KindFirstTriviaToken        = KindSingleLineCommentTrivia
	KindLastTriviaToken         = KindConflictMarkerTrivia
)

func (Kind) String

func (i Kind) String() string

type LabeledStatement

type LabeledStatement struct {
	StatementBase
	Label     *IdentifierNode
	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 LabeledStatementNode

type LabeledStatementNode = Node

type LeftHandSideExpression

type LeftHandSideExpression = Node // Node with LeftHandSideExpressionBase

type LeftHandSideExpressionBase

type LeftHandSideExpressionBase struct {
	UpdateExpressionBase
}

type LiteralExpression

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

type LiteralExpressionBase

type LiteralExpressionBase struct {
	LiteralLikeNodeBase
	PrimaryExpressionBase
}

type LiteralLikeNode

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

type LiteralLikeNodeBase

type LiteralLikeNodeBase struct {
	Text       string
	TokenFlags TokenFlags
}

func (*LiteralLikeNodeBase) LiteralLikeData

func (node *LiteralLikeNodeBase) LiteralLikeData() *LiteralLikeNodeBase

type LiteralSyntaxKind

type LiteralSyntaxKind = Kind // KindNumericLiteral | KindBigIntLiteral | KindStringLiteral | KindJsxText | KindJsxTextAllWhiteSpaces | KindRegularExpressionLiteral | KindNoSubstitutionTemplateLiteral

type LiteralToken

type LiteralToken = Node // NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral

type LiteralTypeNode

type LiteralTypeNode struct {
	TypeNodeBase
	Literal *Node
}

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 LiteralTypeNodeNode

type LiteralTypeNodeNode = Node

type LocalsContainerBase

type LocalsContainerBase struct {
	Locals        SymbolTable
	NextContainer *Node
}

func (*LocalsContainerBase) LocalsContainerData

func (node *LocalsContainerBase) LocalsContainerData() *LocalsContainerBase

type LogicalOperator

type LogicalOperator = Kind // KindAmpersandAmpersandToken | KindBarBarToken

type LogicalOperatorOrHigher

type LogicalOperatorOrHigher = Kind // KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken | KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken | KindLessThanToken | KindLessThanEqualsToken | KindGreaterThanToken | KindGreaterThanEqualsToken | KindInstanceOfKeyword | KindInKeyword | KindEqualsEqualsToken | KindEqualsEqualsEqualsToken | KindExclamationEqualsEqualsToken | KindExclamationEqualsToken | KindAmpersandToken | KindBarToken | KindCaretToken | KindAmpersandAmpersandToken | KindBarBarToken

type LogicalOrCoalescingAssignmentOperator

type LogicalOrCoalescingAssignmentOperator = Kind // KindAmpersandAmpersandEqualsToken | KindBarBarEqualsToken | KindQuestionQuestionEqualsToken

type MappedTypeNode

type MappedTypeNode struct {
	TypeNodeBase
	DeclarationBase
	LocalsContainerBase
	ReadonlyToken *TokenNode // Optional
	TypeParameter *TypeParameterDeclarationNode
	NameType      *TypeNode        // Optional
	QuestionToken *TokenNode       // Optional
	Type          *TypeNode        // Optional
	Members       *TypeElementList // Optional
}

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 MappedTypeNodeNode

type MappedTypeNodeNode = Node

type MemberExpressionBase

type MemberExpressionBase struct {
	LeftHandSideExpressionBase
}

type MemberName

type MemberName = Node // Identifier | PrivateIdentifier

type MetaProperty

type MetaProperty struct {
	PrimaryExpressionBase
	FlowNodeBase
	CompositeBase
	KeywordToken Kind
	// 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 MetaPropertyNode

type MetaPropertyNode = Node

type MethodDeclaration

func (*MethodDeclaration) Clone

func (*MethodDeclaration) ForEachChild

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

func (*MethodDeclaration) Name

func (node *MethodDeclaration) Name() *DeclarationName

func (*MethodDeclaration) VisitEachChild

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

type MethodDeclarationNode

type MethodDeclarationNode = Node

type MethodSignatureDeclaration

type MethodSignatureDeclaration struct {
	NodeBase
	NamedMemberBase
	FunctionLikeBase
	TypeElementBase
	TypeSyntaxBase
}

func (*MethodSignatureDeclaration) Clone

func (*MethodSignatureDeclaration) ForEachChild

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

func (*MethodSignatureDeclaration) Name

func (*MethodSignatureDeclaration) VisitEachChild

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

type MethodSignatureDeclarationNode

type MethodSignatureDeclarationNode = Node

type MinusToken

type MinusToken = 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 MissingDeclarationNode

type MissingDeclarationNode = Node

type Modifier

type Modifier = Node // ModifierSyntaxKind

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 ModifierSyntaxKind

type ModifierSyntaxKind = Kind // KindAbstractKeyword | KindAccessorKeyword | KindAsyncKeyword | KindConstKeyword | KindDeclareKeyword | KindDefaultKeyword | KindExportKeyword | KindInKeyword | KindPrivateKeyword | KindProtectedKeyword | KindPublicKeyword | KindReadonlyKeyword | KindOutKeyword | KindOverrideKeyword | KindStaticKeyword

type ModifiersBase

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

func (*ModifiersBase) Modifiers

func (node *ModifiersBase) Modifiers() *ModifierList

type ModuleBlock

type ModuleBlock struct {
	StatementBase
	CompositeBase
	Statements *StatementList
}

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 ModuleBlockNode

type ModuleBlockNode = Node

type ModuleBody

type ModuleBody = Node // ModuleBlock | ModuleDeclaration

type ModuleDeclaration

type ModuleDeclaration struct {
	DeclarationBase
	StatementBase
	ExportableBase
	ModifiersBase
	LocalsContainerBase
	BodyBase
	CompositeBase
	Keyword Kind
	// 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 MultiplicativeOperator

type MultiplicativeOperator = Kind // KindAsteriskToken | KindSlashToken | KindPercentToken

type MultiplicativeOperatorOrHigher

type MultiplicativeOperatorOrHigher = Kind // KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken

type MutableNode

type MutableNode Node

func (*MutableNode) SetExpression

func (m *MutableNode) SetExpression(expr *Node)

func (*MutableNode) SetInitializer

func (m *MutableNode) SetInitializer(initializer *Node)

func (*MutableNode) SetModifiers

func (n *MutableNode) SetModifiers(modifiers *ModifierList)

func (*MutableNode) SetType

func (m *MutableNode) SetType(t *Node)

type NamedExportBindings

type NamedExportBindings = Node // NamespaceExport | NamedExports

type NamedExports

type NamedExports struct {
	NodeBase
	CompositeBase
	Elements *ExportSpecifierList
}

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
	CompositeBase
	Elements *ImportSpecifierList
}

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 NamedImportsNode

type NamedImportsNode = 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 // 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 *DotDotDotToken // Optional

	QuestionToken *QuestionToken // Optional
	Type          *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 NamedTupleMemberNode

type NamedTupleMemberNode = 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 {
	DeclarationBase
	StatementBase
	ModifiersBase
	TypeSyntaxBase
	// 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 NamespaceExportDeclarationNode

type NamespaceExportDeclarationNode = Node

type NamespaceExportNode

type NamespaceExportNode = 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 NamespaceImportNode

type NamespaceImportNode = Node

type NewExpression

type NewExpression struct {
	PrimaryExpressionBase
	CompositeBase
	Expression    *Expression
	TypeArguments *TypeList    // Optional
	Arguments     *ElementList // Optional
}

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 NewExpressionNode

type NewExpressionNode = Node

type NoSubstitutionTemplateLiteral

type NoSubstitutionTemplateLiteral struct {
	ExpressionBase
	TemplateLiteralLikeNodeBase
	DeclarationBase
}

func (*NoSubstitutionTemplateLiteral) Clone

type NoSubstitutionTemplateLiteralNode

type NoSubstitutionTemplateLiteralNode = Node

type Node

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

	Parent *Node
	// contains filtered or unexported fields
}

func ClimbPastPropertyAccess

func ClimbPastPropertyAccess(node *Node) *Node

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 GetAssignedName

func GetAssignedName(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 GetContainingFunction

func GetContainingFunction(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 GetFirstConstructorWithBody

func GetFirstConstructorWithBody(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 GetJSDocDeprecatedTag

func GetJSDocDeprecatedTag(node *Node) *Node

GetJSDocDeprecatedTag returns the first @deprecated JSDoc tag for the given node, or nil if none exists.

func GetLeftmostAccessExpression

func GetLeftmostAccessExpression(expr *Node) *Node

func GetModuleSpecifierOfBareOrAccessedRequire

func GetModuleSpecifierOfBareOrAccessedRequire(node *Node) *Node

func GetNameOfDeclaration

func GetNameOfDeclaration(declaration *Node) *Node

func GetNamespaceDeclarationNode

func GetNamespaceDeclarationNode(node *Node) *Node

func GetNewTargetContainer

func GetNewTargetContainer(node *Node) *Node

func GetNodeAtPosition

func GetNodeAtPosition(file *SourceFile, position int, 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 GetNonAugmentationDeclaration

func GetNonAugmentationDeclaration(symbol *Symbol) *Node

func GetReparsedNodeForNode

func GetReparsedNodeForNode(node *Node) *Node

If the given node is part of a subtree of JSDoc nodes that have been cloned into a reparsed construct, return the corresponding reparsed clone in the subtree. Otherwise, just return the node.

func GetRestIndicatorOfBindingOrAssignmentElement

func GetRestIndicatorOfBindingOrAssignmentElement(bindingElement *Node) *Node

func GetRestParameterElementType

func GetRestParameterElementType(node *ParameterDeclarationNode) *Node

*

  • Gets the most likely element type for a TypeNode. This is not an exhaustive test
  • as it assumes a rest argument can only be an array type (either T[], or Array<T>). *
  • @param node The type node. *
  • @internal

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 ImportFromModuleSpecifier

func ImportFromModuleSpecifier(node *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 TryGetImportFromModuleSpecifier

func TryGetImportFromModuleSpecifier(node *StringLiteralLike) *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) 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) AsJSDocTemplateTag

func (n *Node) AsJSDocTemplateTag() *JSDocTemplateTag

func (*Node) AsJSDocText

func (n *Node) AsJSDocText() *JSDocText

func (*Node) AsJSDocThisTag

func (n *Node) AsJSDocThisTag() *JSDocThisTag

func (*Node) AsJSDocThrowsTag

func (n *Node) AsJSDocThrowsTag() *JSDocThrowsTag

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

func (n *Node) AsOmittedExpression() *OmittedExpression

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

func (n *Node) AsToken() *Token

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

func (n *Node) AsTypeParameterDeclaration() *TypeParameterDeclaration

func (*Node) AsTypePredicateNode

func (n *Node) AsTypePredicateNode() *TypePredicateNode

func (*Node) AsTypeQueryNode

func (n *Node) AsTypeQueryNode() *TypeQueryNode

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

func (n *Node) CanHaveStatements() bool

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

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

func (*Node) EagerJSDoc

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

EagerJSDoc returns JSDoc nodes that have already been parsed and cached, without triggering lazy JSDoc parsing.

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

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

func (n *Node) RawText() string

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

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 NodeBody

type NodeBody = Node // Block | Expression | ModuleBlock | ModuleDeclaration

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

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

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 *ElementList, multiLine bool) *Node

func (*NodeFactory) NewArrayTypeNode

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

func (*NodeFactory) NewArrowFunction

func (f *NodeFactory) NewArrowFunction(modifiers *ModifierList, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, equalsGreaterThanToken *EqualsGreaterThanToken, body *ConciseBody) *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, tokenFlags TokenFlags) *Node

func (*NodeFactory) NewBinaryExpression

func (f *NodeFactory) NewBinaryExpression(modifiers *ModifierList, left *Expression, typeNode *TypeNode, operatorToken *BinaryOperatorToken, right *Expression) *Node

func (*NodeFactory) NewBindingElement

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

func (*NodeFactory) NewBindingPattern

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

func (*NodeFactory) NewBlock

func (f *NodeFactory) NewBlock(statements *StatementList, multiLine bool) *Node

func (*NodeFactory) NewBreakStatement

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

func (*NodeFactory) NewCallExpression

func (f *NodeFactory) NewCallExpression(expression *Expression, questionDotToken *QuestionDotToken, typeArguments *TypeList, arguments *ElementList, flags NodeFlags) *Node

func (*NodeFactory) NewCallSignatureDeclaration

func (f *NodeFactory) NewCallSignatureDeclaration(typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode) *Node

func (*NodeFactory) NewCaseBlock

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

func (*NodeFactory) NewCaseOrDefaultClause

func (f *NodeFactory) NewCaseOrDefaultClause(kind Kind, expression *Expression, statements *StatementList) *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 *TypeParameterList, heritageClauses *HeritageClauseList, members *ClassElementList) *Node

func (*NodeFactory) NewClassExpression

func (f *NodeFactory) NewClassExpression(modifiers *ModifierList, name *IdentifierNode, typeParameters *TypeParameterList, heritageClauses *HeritageClauseList, members *ClassElementList) *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 *QuestionToken, whenTrue *Expression, colonToken *ColonToken, 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 *TypeParameterList, parameters *ParameterList, typeNode *TypeNode) *Node

func (*NodeFactory) NewConstructorDeclaration

func (f *NodeFactory) NewConstructorDeclaration(modifiers *ModifierList, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) NewConstructorTypeNode

func (f *NodeFactory) NewConstructorTypeNode(modifiers *ModifierList, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *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 *QuestionDotToken, 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 *EnumMemberList) *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 *TypeList) *Node

func (*NodeFactory) NewExternalModuleReference

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

func (*NodeFactory) NewForInOrOfStatement

func (f *NodeFactory) NewForInOrOfStatement(kind Kind, awaitModifier *AwaitKeyword, 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 *AsteriskToken, name *IdentifierNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) NewFunctionExpression

func (f *NodeFactory) NewFunctionExpression(modifiers *ModifierList, asteriskToken *AsteriskToken, name *IdentifierNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) NewFunctionTypeNode

func (f *NodeFactory) NewFunctionTypeNode(typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode) *Node

func (*NodeFactory) NewGetAccessorDeclaration

func (f *NodeFactory) NewGetAccessorDeclaration(modifiers *ModifierList, name *PropertyName, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) NewHeritageClause

func (f *NodeFactory) NewHeritageClause(token Kind, types *ExpressionWithTypeArgumentsList) *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 *ImportAttributeList, multiLine bool) *Node

func (*NodeFactory) NewImportClause

func (f *NodeFactory) NewImportClause(phaseModifier ImportPhaseModifierSyntaxKind, 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 *TypeList) *Node

func (*NodeFactory) NewIndexSignatureDeclaration

func (f *NodeFactory) NewIndexSignatureDeclaration(modifiers *ModifierList, parameters *ParameterList, typeNode *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 *TypeParameterList, heritageClauses *HeritageClauseList, members *TypeElementList) *Node

func (*NodeFactory) NewIntersectionTypeNode

func (f *NodeFactory) NewIntersectionTypeNode(types *TypeList) *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 *ExpressionWithTypeArgumentsNode, 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 *ExpressionWithTypeArgumentsNode, comment *NodeList) *Node

func (*NodeFactory) NewJSDocImportTag

func (f *NodeFactory) NewJSDocImportTag(tagName *IdentifierNode, importClause *ImportClauseNode, moduleSpecifier *Expression, attributes *ImportAttributesNode, comment *NodeList) *Node
func (f *NodeFactory) NewJSDocLink(name *EntityName, text []string) *Node

func (*NodeFactory) NewJSDocLinkCode

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

func (*NodeFactory) NewJSDocLinkPlain

func (f *NodeFactory) NewJSDocLinkPlain(name *EntityName, 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) NewJSDocParameterOrPropertyTag

func (f *NodeFactory) NewJSDocParameterOrPropertyTag(kind Kind, 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) NewJSDocProtectedTag

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

func (*NodeFactory) NewJSDocPublicTag

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

func (*NodeFactory) NewJSDocReadonlyTag

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

func (*NodeFactory) NewJSDocReturnTag

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

func (*NodeFactory) NewJSDocSatisfiesTag

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

func (*NodeFactory) NewJSDocSeeTag

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

func (*NodeFactory) NewJSDocSignature

func (f *NodeFactory) NewJSDocSignature(typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode) *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) NewJSDocThrowsTag

func (f *NodeFactory) NewJSDocThrowsTag(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(modifiers *ModifierList, isExportEquals bool, typeNode *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 *TypeParameterList, typeNode *TypeNode) *Node

func (*NodeFactory) NewJsxAttribute

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

func (*NodeFactory) NewJsxAttributes

func (f *NodeFactory) NewJsxAttributes(properties *JsxAttributeList) *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 *JsxChildList, closingElement *JsxClosingElementNode) *Node

func (*NodeFactory) NewJsxExpression

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

func (*NodeFactory) NewJsxFragment

func (f *NodeFactory) NewJsxFragment(openingFragment *JsxOpeningFragmentNode, children *JsxChildList, 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 *TypeList, attributes *JsxAttributesNode) *Node

func (*NodeFactory) NewJsxOpeningFragment

func (f *NodeFactory) NewJsxOpeningFragment() *Node

func (*NodeFactory) NewJsxSelfClosingElement

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

func (*NodeFactory) NewJsxSpreadAttribute

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

func (*NodeFactory) NewJsxText

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

func (*NodeFactory) NewKeywordExpression

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

func (*NodeFactory) NewKeywordTypeNode

func (f *NodeFactory) NewKeywordTypeNode(kind KeywordTypeSyntaxKind) *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 *TypeElementList) *Node

func (*NodeFactory) NewMetaProperty

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

func (*NodeFactory) NewMethodDeclaration

func (f *NodeFactory) NewMethodDeclaration(modifiers *ModifierList, asteriskToken *AsteriskToken, name *PropertyName, postfixToken *TokenNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) NewMethodSignatureDeclaration

func (f *NodeFactory) NewMethodSignatureDeclaration(modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *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 *StatementList) *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 *ExportSpecifierList) *Node

func (*NodeFactory) NewNamedImports

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

func (*NodeFactory) NewNamedTupleMember

func (f *NodeFactory) NewNamedTupleMember(dotDotDotToken *DotDotDotToken, name *IdentifierNode, questionToken *QuestionToken, 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 *TypeList, arguments *ElementList) *Node

func (*NodeFactory) NewNoSubstitutionTemplateLiteral

func (f *NodeFactory) NewNoSubstitutionTemplateLiteral(text string, templateFlags TokenFlags) *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, tokenFlags TokenFlags) *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 *DotDotDotToken, name *BindingName, questionToken *QuestionToken, 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 *QuestionDotToken, 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, tokenFlags TokenFlags) *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 *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) NewShorthandPropertyAssignment

func (f *NodeFactory) NewShorthandPropertyAssignment(modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeNode *TypeNode, equalsToken *EqualsToken, 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, tokenFlags TokenFlags) *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(typeNode any, isSpread bool, tupleNameSource *Node) *Node

func (*NodeFactory) NewSyntheticReferenceExpression

func (f *NodeFactory) NewSyntheticReferenceExpression(expression *Expression, thisArg *Expression) *Node

func (*NodeFactory) NewTaggedTemplateExpression

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

func (*NodeFactory) NewTemplateExpression

func (f *NodeFactory) NewTemplateExpression(head *TemplateHeadNode, templateSpans *TemplateSpanList) *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 *TemplateLiteralTypeSpanList) *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 TokenSyntaxKind) *Node

func (*NodeFactory) NewTryStatement

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

func (*NodeFactory) NewTupleTypeNode

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

func (*NodeFactory) NewTypeAliasDeclaration

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

func (*NodeFactory) NewTypeAssertion

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

func (*NodeFactory) NewTypeLiteralNode

func (f *NodeFactory) NewTypeLiteralNode(members *TypeElementList) *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, expression *Expression, defaultType *TypeNode) *Node

func (*NodeFactory) NewTypePredicateNode

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

func (*NodeFactory) NewTypeQueryNode

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

func (*NodeFactory) NewTypeReferenceNode

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

func (*NodeFactory) NewUnionTypeNode

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

func (*NodeFactory) NewVariableDeclaration

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

func (*NodeFactory) NewVariableDeclarationList

func (f *NodeFactory) NewVariableDeclarationList(declarations *VariableDeclarationNodeList, flags NodeFlags) *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 *AsteriskToken, 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, multiLine bool) *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, typeNode *TypeNode, fullSignature *TypeNode, equalsGreaterThanToken *EqualsGreaterThanToken, body *ConciseBody) *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 *BinaryOperatorToken, right *Expression) *Node

func (*NodeFactory) UpdateBindingElement

func (f *NodeFactory) UpdateBindingElement(node *BindingElement, dotDotDotToken *DotDotDotToken, 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, multiLine bool) *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 *QuestionDotToken, typeArguments *TypeList, arguments *ElementList, flags NodeFlags) *Node

func (*NodeFactory) UpdateCallSignatureDeclaration

func (f *NodeFactory) UpdateCallSignatureDeclaration(node *CallSignatureDeclaration, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *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 *QuestionToken, whenTrue *Expression, colonToken *ColonToken, 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, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateConstructorDeclaration

func (f *NodeFactory) UpdateConstructorDeclaration(node *ConstructorDeclaration, modifiers *ModifierList, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) UpdateConstructorTypeNode

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

func (*NodeFactory) UpdateContinueStatement

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

func (*NodeFactory) UpdateDecorator

func (f *NodeFactory) UpdateDecorator(node *Decorator, expression *LeftHandSideExpression) *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 *QuestionDotToken, argumentExpression *Expression, flags NodeFlags) *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, isExportEquals bool, 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 *TypeList) *Node

func (*NodeFactory) UpdateExternalModuleReference

func (f *NodeFactory) UpdateExternalModuleReference(node *ExternalModuleReference, expression *Expression) *Node

func (*NodeFactory) UpdateForInOrOfStatement

func (f *NodeFactory) UpdateForInOrOfStatement(node *ForInOrOfStatement, awaitModifier *AwaitKeyword, 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 *AsteriskToken, name *IdentifierNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) UpdateFunctionExpression

func (f *NodeFactory) UpdateFunctionExpression(node *FunctionExpression, modifiers *ModifierList, asteriskToken *AsteriskToken, name *IdentifierNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) UpdateFunctionTypeNode

func (f *NodeFactory) UpdateFunctionTypeNode(node *FunctionTypeNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateGetAccessorDeclaration

func (f *NodeFactory) UpdateGetAccessorDeclaration(node *GetAccessorDeclaration, modifiers *ModifierList, name *PropertyName, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) UpdateHeritageClause

func (f *NodeFactory) UpdateHeritageClause(node *HeritageClause, token Kind, 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, token Kind, attributes *ImportAttributeList, multiLine bool) *Node

func (*NodeFactory) UpdateImportClause

func (f *NodeFactory) UpdateImportClause(node *ImportClause, phaseModifier ImportPhaseModifierSyntaxKind, 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 *TypeList) *Node

func (*NodeFactory) UpdateIndexSignatureDeclaration

func (f *NodeFactory) UpdateIndexSignatureDeclaration(node *IndexSignatureDeclaration, modifiers *ModifierList, parameters *ParameterList, typeNode *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 *TypeParameterDeclarationNode) *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 *ExpressionWithTypeArgumentsNode, 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 *ExpressionWithTypeArgumentsNode, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocImportTag

func (f *NodeFactory) UpdateJSDocImportTag(node *JSDocImportTag, tagName *IdentifierNode, importClause *ImportClauseNode, moduleSpecifier *Expression, attributes *ImportAttributesNode, comment *NodeList) *Node
func (f *NodeFactory) UpdateJSDocLink(node *JSDocLink, name *EntityName, text []string) *Node

func (*NodeFactory) UpdateJSDocLinkCode

func (f *NodeFactory) UpdateJSDocLinkCode(node *JSDocLinkCode, name *EntityName, text []string) *Node

func (*NodeFactory) UpdateJSDocLinkPlain

func (f *NodeFactory) UpdateJSDocLinkPlain(node *JSDocLinkPlain, name *EntityName, 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(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 *TypeParameterList, parameters *ParameterList, typeNode *TypeNode) *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) UpdateJSDocThrowsTag

func (f *NodeFactory) UpdateJSDocThrowsTag(node *JSDocThrowsTag, 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 *Node, comment *NodeList) *Node

func (*NodeFactory) UpdateJSDocTypedefTag

func (f *NodeFactory) UpdateJSDocTypedefTag(node *JSDocTypedefTag, tagName *IdentifierNode, typeExpression *Node, name *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 *DotDotDotToken, 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, namespace *IdentifierNode, name *IdentifierNode) *Node

func (*NodeFactory) UpdateJsxOpeningElement

func (f *NodeFactory) UpdateJsxOpeningElement(node *JsxOpeningElement, tagName *JsxTagNameExpression, typeArguments *TypeList, attributes *JsxAttributesNode) *Node

func (*NodeFactory) UpdateJsxSelfClosingElement

func (f *NodeFactory) UpdateJsxSelfClosingElement(node *JsxSelfClosingElement, tagName *JsxTagNameExpression, typeArguments *TypeList, 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, keywordToken Kind, name *IdentifierNode) *Node

func (*NodeFactory) UpdateMethodDeclaration

func (f *NodeFactory) UpdateMethodDeclaration(node *MethodDeclaration, modifiers *ModifierList, asteriskToken *AsteriskToken, name *PropertyName, postfixToken *TokenNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) UpdateMethodSignatureDeclaration

func (f *NodeFactory) UpdateMethodSignatureDeclaration(node *MethodSignatureDeclaration, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeParameters *TypeParameterList, parameters *ParameterList, typeNode *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 *DotDotDotToken, name *IdentifierNode, questionToken *QuestionToken, 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 *TypeList, arguments *ElementList) *Node

func (*NodeFactory) UpdateNonNullExpression

func (f *NodeFactory) UpdateNonNullExpression(node *NonNullExpression, expression *Expression, flags NodeFlags) *Node

func (*NodeFactory) UpdateObjectLiteralExpression

func (f *NodeFactory) UpdateObjectLiteralExpression(node *ObjectLiteralExpression, properties *NodeList, multiLine bool) *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 *DotDotDotToken, name *BindingName, questionToken *QuestionToken, 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, operator Kind) *Node

func (*NodeFactory) UpdatePrefixUnaryExpression

func (f *NodeFactory) UpdatePrefixUnaryExpression(node *PrefixUnaryExpression, operator Kind, operand *Expression) *Node

func (*NodeFactory) UpdatePropertyAccessExpression

func (f *NodeFactory) UpdatePropertyAccessExpression(node *PropertyAccessExpression, expression *Expression, questionDotToken *QuestionDotToken, name *MemberName, flags NodeFlags) *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, typeNode *TypeNode, fullSignature *TypeNode, body *FunctionBody) *Node

func (*NodeFactory) UpdateShorthandPropertyAssignment

func (f *NodeFactory) UpdateShorthandPropertyAssignment(node *ShorthandPropertyAssignment, modifiers *ModifierList, name *PropertyName, postfixToken *TokenNode, typeNode *TypeNode, equalsToken *EqualsToken, 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) UpdateSyntaxList

func (f *NodeFactory) UpdateSyntaxList(node *SyntaxList, children []*Node) *Node

func (*NodeFactory) UpdateSyntheticExpression

func (f *NodeFactory) UpdateSyntheticExpression(node *SyntheticExpression, typeNode any, isSpread bool, tupleNameSource *Node) *Node

func (*NodeFactory) UpdateSyntheticReferenceExpression

func (f *NodeFactory) UpdateSyntheticReferenceExpression(node *SyntheticReferenceExpression, expression *Expression, thisArg *Expression) *Node

func (*NodeFactory) UpdateTaggedTemplateExpression

func (f *NodeFactory) UpdateTaggedTemplateExpression(node *TaggedTemplateExpression, tag *Expression, questionDotToken *QuestionDotToken, typeArguments *TypeList, template *TemplateLiteral, flags NodeFlags) *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, operator Kind, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateTypeParameterDeclaration

func (f *NodeFactory) UpdateTypeParameterDeclaration(node *TypeParameterDeclaration, modifiers *ModifierList, name *IdentifierNode, constraint *TypeNode, expression *Expression, defaultType *TypeNode) *Node

func (*NodeFactory) UpdateTypePredicateNode

func (f *NodeFactory) UpdateTypePredicateNode(node *TypePredicateNode, assertsModifier *AssertsKeyword, parameterName *TypePredicateParameterName, typeNode *TypeNode) *Node

func (*NodeFactory) UpdateTypeQueryNode

func (f *NodeFactory) UpdateTypeQueryNode(node *TypeQueryNode, exprName *EntityName, typeArguments *TypeList) *Node

func (*NodeFactory) UpdateTypeReferenceNode

func (f *NodeFactory) UpdateTypeReferenceNode(node *TypeReferenceNode, typeName *EntityName, typeArguments *TypeList) *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 *ExclamationToken, typeNode *TypeNode, initializer *Expression) *Node

func (*NodeFactory) UpdateVariableDeclarationList

func (f *NodeFactory) UpdateVariableDeclarationList(node *VariableDeclarationList, declarations *VariableDeclarationNodeList, flags NodeFlags) *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 *AsteriskToken, 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

	// 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
	NodeFlagsPossiblyContainsDeprecatedTag NodeFlags = 1 << 26 // Set during parse if comment text contains '@deprecated'; must confirm via JSDoc lookup
	NodeFlagsUnreachable                   NodeFlags = 1 << 27 // If node is unreachable according to the binder

	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 NodeWithTypeArgumentsBase

type NodeWithTypeArgumentsBase struct {
	TypeNodeBase
	TypeArguments *TypeList // Optional
}

type NonNullExpression

type NonNullExpression struct {
	LeftHandSideExpressionBase
	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 NonNullExpressionNode

type NonNullExpressionNode = Node

type NotEmittedStatement

type NotEmittedStatement struct {
	StatementBase
}

func (*NotEmittedStatement) Clone

type NotEmittedStatementNode

type NotEmittedStatementNode = Node

type NotEmittedTypeElement

type NotEmittedTypeElement struct {
	NodeBase
	TypeElementBase
}

func (*NotEmittedTypeElement) Clone

type NotEmittedTypeElementNode

type NotEmittedTypeElementNode = Node

type NullLiteral

type NullLiteral = Node

type NumericLiteral

type NumericLiteral struct {
	LiteralExpressionBase
}

func (*NumericLiteral) Clone

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

type NumericLiteralNode

type NumericLiteralNode = Node

type NumericOrStringLikeLiteral

type NumericOrStringLikeLiteral = Node // StringLiteralLikeNode | NumericLiteral

type ObjectDestructuringAssignment

type ObjectDestructuringAssignment = Node // BinaryExpression

type ObjectLiteralElement

type ObjectLiteralElement = Node // Node with ObjectLiteralElementBase

type ObjectLiteralElementBase

type ObjectLiteralElementBase struct{}

type ObjectLiteralElementLike

type ObjectLiteralElementLike = Node // PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration

type ObjectLiteralExpression

type ObjectLiteralExpression struct {
	PrimaryExpressionBase
	DeclarationBase
	CompositeBase
	Properties *NodeList
	MultiLine  bool
}

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 ObjectLiteralLikeNode

type ObjectLiteralLikeNode = Node // ObjectLiteralExpression | ObjectBindingPattern

type ObjectTypeDeclaration

type ObjectTypeDeclaration = Node // ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode

type OmittedExpression

type OmittedExpression struct {
	ExpressionBase
}

func (*OmittedExpression) Clone

type OmittedExpressionNode

type OmittedExpressionNode = Node

type OperatorPrecedence

type OperatorPrecedence int
const (
	// Expression:
	//     AssignmentExpression
	//     Expression `,` AssignmentExpression
	OperatorPrecedenceComma OperatorPrecedence = iota
	// NOTE: `Spread` is higher than `Comma` due to how it is parsed in |ElementList|
	// SpreadElement:
	//     `...` AssignmentExpression
	OperatorPrecedenceSpread
	// AssignmentExpression:
	//     ConditionalExpression
	//     YieldExpression
	//     ArrowFunction
	//     AsyncArrowFunction
	//     LeftHandSideExpression `=` AssignmentExpression
	//     LeftHandSideExpression AssignmentOperator AssignmentExpression
	//
	// NOTE: AssignmentExpression is broken down into several precedences due to the requirements
	//       of the parenthesizer rules.
	// AssignmentExpression: YieldExpression
	// YieldExpression:
	//     `yield`
	//     `yield` AssignmentExpression
	//     `yield` `*` AssignmentExpression
	OperatorPrecedenceYield
	// AssignmentExpression: LeftHandSideExpression `=` AssignmentExpression
	// AssignmentExpression: LeftHandSideExpression AssignmentOperator AssignmentExpression
	// AssignmentOperator: one of
	//     `*=` `/=` `%=` `+=` `-=` `<<=` `>>=` `>>>=` `&=` `^=` `|=` `**=`
	OperatorPrecedenceAssignment
	// NOTE: `Conditional` is considered higher than `Assignment` here, but in reality they have
	//       the same precedence.
	// AssignmentExpression: ConditionalExpression
	// ConditionalExpression:
	//     ShortCircuitExpression
	//     ShortCircuitExpression `?` AssignmentExpression `:` AssignmentExpression
	OperatorPrecedenceConditional
	// 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
	// ShortCircuitExpression:
	//     LogicalORExpression
	//     CoalesceExpression
	// CoalesceExpression:
	//     CoalesceExpressionHead `??` BitwiseORExpression
	// CoalesceExpressionHead:
	//     CoalesceExpression
	//     BitwiseORExpression
	OperatorPrecedenceCoalesce = OperatorPrecedenceLogicalOR
	// -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
}

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 OptionalTypeNodeNode

type OptionalTypeNodeNode = Node

type OutKeyword

type OutKeyword = 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 OverrideKeyword

type OverrideKeyword = Node

type ParameterDeclaration

type ParameterDeclaration struct {
	NodeBase
	DeclarationBase
	ModifiersBase
	CompositeBase
	DotDotDotToken *DotDotDotToken // Optional

	QuestionToken *QuestionToken // Optional
	Type          *TypeNode      // Optional
	Initializer   *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 {
	PrimaryExpressionBase
	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 ParenthesizedExpressionNode

type ParenthesizedExpressionNode = Node

type ParenthesizedTypeNode

type ParenthesizedTypeNode struct {
	TypeNodeBase
	Type *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 ParenthesizedTypeNodeNode

type ParenthesizedTypeNodeNode = Node

type PartiallyEmittedExpression

type PartiallyEmittedExpression struct {
	LeftHandSideExpressionBase
	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 PartiallyEmittedExpressionNode

type PartiallyEmittedExpressionNode = Node

type PatternAmbientModule

type PatternAmbientModule struct {
	Pattern core.Pattern
	Symbol  *Symbol
}

type PlusToken

type PlusToken = Node

type PositionMap

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

PositionMap provides bidirectional mapping between UTF-8 byte offsets (used by Go) and UTF-16 code unit offsets (used by JavaScript/TypeScript).

For ASCII-only text, the two are identical. For text containing non-ASCII characters, the offsets diverge because multi-byte UTF-8 sequences map to different numbers of UTF-16 code units:

  • U+0000..U+007F: 1 byte in UTF-8, 1 code unit in UTF-16
  • U+0080..U+07FF: 2 bytes in UTF-8, 1 code unit in UTF-16
  • U+0800..U+FFFF: 3 bytes in UTF-8, 1 code unit in UTF-16
  • U+10000..U+10FFFF: 4 bytes in UTF-8, 2 code units in UTF-16 (surrogate pair)

func ComputePositionMap

func ComputePositionMap(text string) *PositionMap

ComputePositionMap builds a PositionMap for the given text.

func (*PositionMap) IsAsciiOnly

func (pm *PositionMap) IsAsciiOnly() bool

IsAsciiOnly returns true if the text is ASCII-only, meaning UTF-8 and UTF-16 offsets are identical.

func (*PositionMap) UTF8ToUTF16

func (pm *PositionMap) UTF8ToUTF16(utf8Offset int) int

UTF8ToUTF16 converts a UTF-8 byte offset to a UTF-16 code unit offset.

func (*PositionMap) UTF16ToUTF8

func (pm *PositionMap) UTF16ToUTF8(utf16Offset int) int

UTF16ToUTF8 converts a UTF-16 code unit offset to a UTF-8 byte offset.

type PostfixUnaryExpression

type PostfixUnaryExpression struct {
	UpdateExpressionBase
	Operand  *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 PostfixUnaryExpressionNode

type PostfixUnaryExpressionNode = Node

type PostfixUnaryOperator

type PostfixUnaryOperator = Kind // KindPlusPlusToken | KindMinusMinusToken

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 {
	UpdateExpressionBase
	Operator Kind
	Operand  *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 PrefixUnaryExpressionNode

type PrefixUnaryExpressionNode = Node

type PrefixUnaryOperator

type PrefixUnaryOperator = Kind // KindPlusToken | KindMinusToken | KindTildeToken | KindExclamationToken | KindPlusPlusToken | KindMinusMinusToken

type PrimaryExpressionBase

type PrimaryExpressionBase struct {
	MemberExpressionBase
}

type PrivateIdentifier

type PrivateIdentifier struct {
	PrimaryExpressionBase
	Text string
}

func (*PrivateIdentifier) Clone

type PrivateIdentifierNode

type PrivateIdentifierNode = Node

type PrivateKeyword

type PrivateKeyword = Node

type PropertyAccessExpression

type PropertyAccessExpression struct {
	MemberExpressionBase
	FlowNodeBase
	CompositeBase
	Expression       *Expression
	QuestionDotToken *QuestionDotToken // Optional
	// 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
	CompositeBase
	Type        *TypeNode
	Initializer *Expression
}

func (*PropertyAssignment) Clone

func (*PropertyAssignment) ForEachChild

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

func (*PropertyAssignment) Name

func (node *PropertyAssignment) Name() *DeclarationName

func (*PropertyAssignment) VisitEachChild

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

type PropertyAssignmentNode

type PropertyAssignmentNode = Node

type PropertyDeclaration

type PropertyDeclaration struct {
	NodeBase
	NamedMemberBase
	ClassElementBase
	CompositeBase
	Type        *TypeNode   // Optional
	Initializer *Expression // Optional
}

func (*PropertyDeclaration) Clone

func (*PropertyDeclaration) ForEachChild

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

func (*PropertyDeclaration) Name

func (node *PropertyDeclaration) Name() *DeclarationName

func (*PropertyDeclaration) VisitEachChild

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

type PropertyDeclarationNode

type PropertyDeclarationNode = Node

type PropertyDefinitionList

type PropertyDefinitionList = NodeList // NodeList[*ObjectLiteralElement]

type PropertyName

type PropertyName = Node // Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | BigIntLiteral

type PropertyNameLiteral

type PropertyNameLiteral = Node // Identifier | StringLiteral | NumericLiteral

type PropertySignatureDeclaration

type PropertySignatureDeclaration struct {
	NodeBase
	NamedMemberBase
	TypeElementBase
	TypeSyntaxBase
	Type        *TypeNode
	Initializer *Expression
}

func (*PropertySignatureDeclaration) Clone

func (*PropertySignatureDeclaration) ForEachChild

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

func (*PropertySignatureDeclaration) Name

func (*PropertySignatureDeclaration) VisitEachChild

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

type PropertySignatureDeclarationNode

type PropertySignatureDeclarationNode = Node

type ProtectedKeyword

type ProtectedKeyword = Node

type PseudoLiteralSyntaxKind

type PseudoLiteralSyntaxKind = Kind // KindTemplateHead | KindTemplateMiddle | KindTemplateTail

type PseudoLiteralToken

type PseudoLiteralToken = Node // PseudoLiteralSyntaxKind

type PublicKeyword

type PublicKeyword = Node

type PunctuationSyntaxKind

type PunctuationSyntaxKind = Kind // 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 | KindBacktickToken | KindHashToken | KindEqualsToken | KindPlusEqualsToken | KindMinusEqualsToken | KindAsteriskEqualsToken | KindAsteriskAsteriskEqualsToken | KindSlashEqualsToken | KindPercentEqualsToken | KindLessThanLessThanEqualsToken | KindGreaterThanGreaterThanEqualsToken | KindGreaterThanGreaterThanGreaterThanEqualsToken | KindAmpersandEqualsToken | KindBarEqualsToken | KindBarBarEqualsToken | KindAmpersandAmpersandEqualsToken | KindQuestionQuestionEqualsToken | KindCaretEqualsToken

type QualifiedName

type QualifiedName struct {
	NodeBase
	FlowNodeBase
	CompositeBase
	Left  *EntityName
	Right *IdentifierNode
}

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 QualifiedNameNode

type QualifiedNameNode = Node

type QuestionDotToken

type QuestionDotToken = Node

type QuestionToken

type QuestionToken = Node

type ReadonlyKeyword

type ReadonlyKeyword = Node

type RegularExpressionLiteral

type RegularExpressionLiteral struct {
	LiteralExpressionBase
}

func (*RegularExpressionLiteral) Clone

type RegularExpressionLiteralNode

type RegularExpressionLiteralNode = Node

type RelationalOperator

type RelationalOperator = Kind // KindLessThanToken | KindLessThanEqualsToken | KindGreaterThanToken | KindGreaterThanEqualsToken | KindInstanceOfKeyword | KindInKeyword

type RelationalOperatorOrHigher

type RelationalOperatorOrHigher = Kind // KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken | KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken | KindLessThanToken | KindLessThanEqualsToken | KindGreaterThanToken | KindGreaterThanEqualsToken | KindInstanceOfKeyword | KindInKeyword

type RepopulateDiagnosticInfo

type RepopulateDiagnosticInfo struct {
	Kind            RepopulateDiagnosticKind
	ModuleReference string
	Mode            core.ResolutionMode
	PackageName     string
}

RepopulateDiagnosticInfo stores information needed to recompute a diagnostic chain entry during incremental builds when the program state may have changed.

type RepopulateDiagnosticKind

type RepopulateDiagnosticKind int

RepopulateDiagnosticKind indicates the kind of repopulation for a diagnostic chain entry.

const (
	RepopulateModeMismatch   RepopulateDiagnosticKind = 1
	RepopulateModuleNotFound RepopulateDiagnosticKind = 2
)

type RestTypeNode

type RestTypeNode struct {
	TypeNodeBase
	Type *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 RestTypeNodeNode

type RestTypeNodeNode = Node

type ReturnStatement

type ReturnStatement struct {
	StatementBase
	CompositeBase
	Expression *Expression // Optional
}

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 ReturnStatementNode

type ReturnStatementNode = Node

type SatisfiesExpression

type SatisfiesExpression struct {
	ExpressionBase
	Expression *Expression
	Type       *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 SatisfiesExpressionNode

type SatisfiesExpressionNode = 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 SemicolonClassElementNode

type SemicolonClassElementNode = Node

type SetAccessorDeclaration

type SetAccessorDeclaration struct {
	AccessorDeclarationBase
}

func (*SetAccessorDeclaration) Clone

func (*SetAccessorDeclaration) ForEachChild

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

func (*SetAccessorDeclaration) Name

func (*SetAccessorDeclaration) VisitEachChild

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

type SetAccessorDeclarationNode

type SetAccessorDeclarationNode = Node

type ShiftOperator

type ShiftOperator = Kind // KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken

type ShiftOperatorOrHigher

type ShiftOperatorOrHigher = Kind // KindAsteriskAsteriskToken | KindAsteriskToken | KindSlashToken | KindPercentToken | KindPlusToken | KindMinusToken | KindLessThanLessThanToken | KindGreaterThanGreaterThanToken | KindGreaterThanGreaterThanGreaterThanToken

type ShorthandPropertyAssignment

type ShorthandPropertyAssignment struct {
	NodeBase
	NamedMemberBase
	ObjectLiteralElementBase
	CompositeBase
	Type                        *TypeNode
	EqualsToken                 *EqualsToken // Optional
	ObjectAssignmentInitializer *Expression  // Optional
}

func (*ShorthandPropertyAssignment) Clone

func (*ShorthandPropertyAssignment) ForEachChild

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

func (*ShorthandPropertyAssignment) Name

func (*ShorthandPropertyAssignment) VisitEachChild

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

type ShorthandPropertyAssignmentNode

type ShorthandPropertyAssignmentNode = Node

type SignatureDeclaration

type SignatureDeclaration = Node // CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignatureDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction

type SourceFile

type SourceFile struct {
	NodeBase
	DeclarationBase
	LocalsContainerBase
	CompositeBase

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

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

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

	ReparsedClones          []*Node
	Pragmas                 []Pragma
	ReferencedFiles         []*FileReference
	TypeReferenceDirectives []*FileReference
	LibReferenceDirectives  []*FileReference
	CheckJsDirective        *CheckJsDirective
	NodeCount               int
	TextCount               int
	CommonJSModuleIndicator *Node
	// If this is the SourceFile itself, then this module was "forced"
	// to be an external module (previously "true").
	ExternalModuleIndicator *Node

	BindSuggestionDiagnostics []*Diagnostic
	EndFlowNode               *FlowNode
	SymbolCount               int
	ClassifiableNames         collections.Set[string]
	PatternAmbientModules     []*PatternAmbientModule
	NestedCJSExports          []*Node
	GlobalExports             SymbolTable

	Hash xxh3.Uint128
	// 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) ECMALineMap

func (node *SourceFile) ECMALineMap() []core.TextPos

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

func (file *SourceFile) GetNameTable() map[string]int

GetNameTable returns a map of all names in the file to their positions. If the name appears more than once, the value is -1.

func (*SourceFile) GetOrCreateToken

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

Gets a token from the file's token cache, or creates it if it does not already exist. This function should NOT be used for creating synthetic tokens that are not in the file in the first place.

func (*SourceFile) GetPositionMap

func (file *SourceFile) GetPositionMap() *PositionMap

GetPositionMap returns the PositionMap for this source file, computing it lazily.

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

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

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

func (node *SourceFile) SetHasLazyJSDoc(lazy bool)

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
	ECMALineMap() []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
	ExternalModuleIndicatorOptions ExternalModuleIndicatorOptions
}

type SpreadAssignment

type SpreadAssignment struct {
	NodeBase
	DeclarationBase
	ObjectLiteralElementBase
	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 SpreadAssignmentNode

type SpreadAssignmentNode = Node

type SpreadElement

type SpreadElement struct {
	ExpressionBase
	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 SpreadElementNode

type SpreadElementNode = Node

type Statement

type Statement = Node // Node with StatementBase

type StatementBase

type StatementBase struct {
	NodeBase
	FlowNodeBase
}

type StatementList

type StatementList = NodeList // NodeList[*Statement]

type StaticKeyword

type StaticKeyword = Node

type StringLiteral

type StringLiteral struct {
	LiteralExpressionBase
}

func (*StringLiteral) Clone

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

type StringLiteralLike

type StringLiteralLike = Node // StringLiteral | NoSubstitutionTemplateLiteral

type StringLiteralLikeNode

type StringLiteralLikeNode = Node // StringLiteral | NoSubstitutionTemplateLiteral

type StringLiteralNode

type StringLiteralNode = Node

type SubtreeFacts

type SubtreeFacts uint32

type SuperExpression

type SuperExpression = Node

type SwitchStatement

type SwitchStatement struct {
	StatementBase
	CompositeBase
	Expression *Expression
	CaseBlock  *CaseBlockNode
}

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 SwitchStatementNode

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

func (*Symbol) CombinedLocalAndExportSymbolFlags

func (s *Symbol) CombinedLocalAndExportSymbolFlags() SymbolFlags

See comment on `declareModuleMember` in `binder.go`.

func (*Symbol) IsExternalModule

func (s *Symbol) IsExternalModule() bool

func (*Symbol) IsStatic

func (s *Symbol) IsStatic() bool

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

func (*SyntaxList) VisitEachChild

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

type SyntaxListNode

type SyntaxListNode = Node

type SyntheticExpression

type SyntheticExpression struct {
	ExpressionBase
	Type            any
	IsSpread        bool
	TupleNameSource *Node // Optional
}

func (*SyntheticExpression) Clone

func (*SyntheticExpression) ForEachChild

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

func (*SyntheticExpression) VisitEachChild

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

type SyntheticExpressionNode

type SyntheticExpressionNode = Node

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 SyntheticReferenceExpressionNode

type SyntheticReferenceExpressionNode = Node

type TaggedTemplateExpression

type TaggedTemplateExpression struct {
	MemberExpressionBase
	CompositeBase
	Tag              *Expression
	QuestionDotToken *QuestionDotToken
	TypeArguments    *TypeList // Optional
	Template         *TemplateLiteral
}

func (*TaggedTemplateExpression) Clone

func (*TaggedTemplateExpression) ForEachChild

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

func (*TaggedTemplateExpression) VisitEachChild

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

type TaggedTemplateExpressionNode

type TaggedTemplateExpressionNode = Node

type TemplateExpression

type TemplateExpression struct {
	PrimaryExpressionBase
	CompositeBase
	Head          *TemplateHeadNode
	TemplateSpans *TemplateSpanList
}

func (*TemplateExpression) Clone

func (*TemplateExpression) ForEachChild

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

func (*TemplateExpression) VisitEachChild

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

type TemplateExpressionNode

type TemplateExpressionNode = Node

type TemplateHead

type TemplateHead struct {
	NodeBase
	TemplateLiteralLikeNodeBase
}

func (*TemplateHead) Clone

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

type TemplateHeadNode

type TemplateHeadNode = Node

type TemplateLiteral

type TemplateLiteral = Node // TemplateExpression | NoSubstitutionTemplateLiteral

type TemplateLiteralLikeNode

type TemplateLiteralLikeNode = Node // PseudoLiteralSyntaxKind

type TemplateLiteralLikeNodeBase

type TemplateLiteralLikeNodeBase struct {
	LiteralLikeNodeBase
	RawText       string
	TemplateFlags TokenFlags
}

func (*TemplateLiteralLikeNodeBase) LiteralLikeData

func (node *TemplateLiteralLikeNodeBase) LiteralLikeData() *LiteralLikeNodeBase

func (*TemplateLiteralLikeNodeBase) TemplateLiteralLikeData

func (node *TemplateLiteralLikeNodeBase) TemplateLiteralLikeData() *TemplateLiteralLikeNodeBase

type TemplateLiteralToken

type TemplateLiteralToken = Node // NoSubstitutionTemplateLiteral | PseudoLiteralToken

type TemplateLiteralTypeNode

type TemplateLiteralTypeNode struct {
	TypeNodeBase
	Head          *TemplateHeadNode
	TemplateSpans *TemplateLiteralTypeSpanList
}

func (*TemplateLiteralTypeNode) Clone

func (*TemplateLiteralTypeNode) ForEachChild

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

func (*TemplateLiteralTypeNode) VisitEachChild

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

type TemplateLiteralTypeNodeNode

type TemplateLiteralTypeNodeNode = Node

type TemplateLiteralTypeSpan

type TemplateLiteralTypeSpan struct {
	TypeNodeBase
	Type    *TypeNode
	Literal *TemplateMiddleOrTail
}

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
	TemplateLiteralLikeNodeBase
}

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
	Literal    *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
	TemplateLiteralLikeNodeBase
}

func (*TemplateTail) Clone

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

type TemplateTailNode

type TemplateTailNode = Node

type ThisExpression

type ThisExpression = Node

type ThisTypeNode

type ThisTypeNode struct {
	TypeNodeBase
}

func (*ThisTypeNode) Clone

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

type ThisTypeNodeNode

type ThisTypeNodeNode = Node

type ThrowStatement

type ThrowStatement struct {
	StatementBase
	CompositeBase
	Expression *Expression
}

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 ThrowStatementNode

type ThrowStatementNode = Node

type Token

type Token struct {
	NodeBase
}

func (*Token) Clone

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

type TokenCacheKey

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

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'`
	TokenFlagsPrecedingJSDocWithDeprecated   TokenFlags = 1 << 17 // Preceding JSDoc comment contains @deprecated
	TokenFlagsPrecedingJSDocWithSeeOrLink    TokenFlags = 1 << 18 // Preceding JSDoc comment contains @see or @link
	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 TokenSyntaxKind

type TokenSyntaxKind = Kind // KindUnknown | KindEndOfFile | KindSingleLineCommentTrivia | KindMultiLineCommentTrivia | KindNewLineTrivia | KindWhitespaceTrivia | KindConflictMarkerTrivia | KindNonTextFileMarkerTrivia | KindNumericLiteral | KindBigIntLiteral | KindStringLiteral | KindJsxText | KindJsxTextAllWhiteSpaces | KindRegularExpressionLiteral | KindNoSubstitutionTemplateLiteral | KindTemplateHead | KindTemplateMiddle | KindTemplateTail | 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 | KindBacktickToken | KindHashToken | KindEqualsToken | KindPlusEqualsToken | KindMinusEqualsToken | KindAsteriskEqualsToken | KindAsteriskAsteriskEqualsToken | KindSlashEqualsToken | KindPercentEqualsToken | KindLessThanLessThanEqualsToken | KindGreaterThanGreaterThanEqualsToken | KindGreaterThanGreaterThanGreaterThanEqualsToken | KindAmpersandEqualsToken | KindBarEqualsToken | KindBarBarEqualsToken | KindAmpersandAmpersandEqualsToken | KindQuestionQuestionEqualsToken | KindCaretEqualsToken | KindIdentifier | KindPrivateIdentifier | KindJSDocCommentTextToken | 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 | KindImplementsKeyword | KindInterfaceKeyword | KindLetKeyword | KindPackageKeyword | KindPrivateKeyword | KindProtectedKeyword | KindPublicKeyword | KindStaticKeyword | KindYieldKeyword | 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 | KindDeferKeyword

type TriviaSyntaxKind

type TriviaSyntaxKind = Kind // KindSingleLineCommentTrivia | KindMultiLineCommentTrivia | KindNewLineTrivia | KindWhitespaceTrivia | KindConflictMarkerTrivia

type TrueLiteral

type TrueLiteral = Node

type TryStatement

type TryStatement struct {
	StatementBase
	CompositeBase
	TryBlock     *BlockNode
	CatchClause  *CatchClauseNode // Optional
	FinallyBlock *BlockNode       // Optional
}

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 TryStatementNode

type TryStatementNode = Node

type TupleTypeNode

type TupleTypeNode struct {
	TypeNodeBase
	Elements *TypeList
}

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 TupleTypeNodeNode

type TupleTypeNodeNode = Node

type TypeAliasDeclaration

type TypeAliasDeclaration struct {
	DeclarationBase
	StatementBase
	ExportableBase
	ModifiersBase
	LocalsContainerBase
	TypeSyntaxBase

	TypeParameters *TypeParameterList // Optional
	Type           *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 TypeAliasDeclarationNode

type TypeAliasDeclarationNode = Node

type TypeArgumentList

type TypeArgumentList = NodeList // NodeList[*TypeNode]

type TypeAssertion

type TypeAssertion struct {
	UnaryExpressionBase
	Type       *TypeNode
	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 TypeAssertionNode

type TypeAssertionNode = Node

type TypeElement

type TypeElement = Node // Node with TypeElementBase

type TypeElementBase

type TypeElementBase struct{}

type TypeElementList

type TypeElementList = NodeList // NodeList[*TypeElement]

type TypeList

type TypeList = NodeList // NodeList[*TypeNode]

type TypeLiteralNode

type TypeLiteralNode struct {
	TypeNodeBase
	DeclarationBase
	Members *TypeElementList
}

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 TypeLiteralNodeNode

type TypeLiteralNodeNode = Node

type TypeNode

type TypeNode = Node // Node with TypeNodeBase

func GetTypeAnnotationNode

func GetTypeAnnotationNode(node *Node) *TypeNode

type TypeNodeBase

type TypeNodeBase struct {
	NodeBase
	TypeSyntaxBase
}

type TypeOfExpression

type TypeOfExpression struct {
	UnaryExpressionBase
	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 TypeOfExpressionNode

type TypeOfExpressionNode = Node

type TypeOnlyImportDeclaration

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

type TypeOperatorNode

type TypeOperatorNode struct {
	TypeNodeBase
	Operator Kind
	Type     *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 TypeOperatorNodeNode

type TypeOperatorNodeNode = Node

type TypeParameterDeclaration

type TypeParameterDeclaration struct {
	NodeBase
	DeclarationBase
	ModifiersBase
	TypeSyntaxBase

	Constraint  *TypeNode   // Optional
	Expression  *Expression // Optional
	DefaultType *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]:
	//       ConditionalTypeNode[?Extends]
	//
	//   ConditionalTypeNode[Extends]:
	//       [~Extends] UnionTypeNode `extends` Type[+Extends] `?` Type[~Extends] `:` Type[~Extends]
	//
	TypePrecedenceConditional TypePrecedence = iota

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

	// Function precedence
	//
	//   Type[Extends]:
	//       ConditionalTypeNode[?Extends]
	//       FunctionTypeNode[?Extends]
	//       ConstructorTypeNode[?Extends]
	//
	//   ConditionalTypeNode[Extends]:
	//       UnionTypeNode
	//
	//   FunctionTypeNode[Extends]:
	//       TypeParameters? ArrowParameters `=>` Type[?Extends]
	//
	//   ConstructorTypeNode[Extends]:
	//       `abstract`? TypeParameters? ArrowParameters `=>` Type[?Extends]
	//
	TypePrecedenceFunction

	// Union precedence
	//
	//   UnionTypeNode:
	//       `|`? UnionTypeNoBar
	//
	//   UnionTypeNoBar:
	//       IntersectionTypeNode
	//       UnionTypeNoBar `|` IntersectionTypeNode
	//
	TypePrecedenceUnion

	// Intersection precedence
	//
	//   IntersectionTypeNode:
	//       `&`? IntersectionTypeNoAmpersand
	//
	//   IntersectionTypeNoAmpersand:
	//       TypeOperatorNode
	//       IntersectionTypeNoAmpersand `&` TypeOperatorNode
	//
	TypePrecedenceIntersection

	// TypeOperatorNode precedence
	//
	//   TypeOperatorNode:
	//     PostfixType
	//     InferTypeNode
	//     `keyof` TypeOperatorNode
	//     `unique` TypeOperatorNode
	//     `readonly` PostfixType
	//
	//   InferTypeNode:
	//     `infer` BindingIdentifier
	//     `infer` BindingIdentifier `extends` Type[+Extends]
	//
	TypePrecedenceTypeOperator

	// Postfix precedence
	//
	//   PostfixType:
	//       NonArrayType
	//       OptionalTypeNode
	//       ArrayTypeNode
	//       IndexedAccessTypeNode
	//
	//   OptionalTypeNode:
	//       PostfixType `?`
	//
	//   ArrayTypeNode:
	//       PostfixType `[` `]`
	//
	//   IndexedAccessTypeNode:
	//       PostfixType `[` Type[~Extends] `]`
	//
	TypePrecedencePostfix

	// NonArray precedence (highest)
	//
	//   NonArrayType:
	//       KeywordType
	//       LiteralTypeNode
	//       ThisTypeNode
	//       ImportType
	//       TypeQueryNode
	//       MappedTypeNode
	//       TypeLiteralNode
	//       TupleTypeNode
	//       ParenthesizedTypeNode
	//       TypePredicateNode
	//       TypeReferenceNode
	//       TemplateType
	//
	//   KeywordType: one of
	//       `any`       `unknown` `string`    `number` `bigint`
	//       `symbol`    `boolean` `undefined` `never`  `object`
	//       `intrinsic` `void`
	//
	//   LiteralTypeNode:
	//       StringLiteral
	//       NoSubstitutionTemplateLiteral
	//       NumericLiteral
	//       BigIntLiteral
	//       `-` NumericLiteral
	//       `-` BigIntLiteral
	//       `true`
	//       `false`
	//       `null`
	//
	//   ThisTypeNode:
	//       `this`
	//
	//   ImportType:
	//       `typeof`? `import` `(` Type[~Extends] `,`? `)` ImportTypeQualifier? TypeArguments?
	//       `typeof`? `import` `(` Type[~Extends] `,` ImportTypeAttributes `,`? `)` ImportTypeQualifier? TypeArguments?
	//
	//   ImportTypeQualifier:
	//       `.` EntityName
	//
	//   ImportTypeAttributes:
	//       `{` `with` `:` ImportAttributes `,`? `}`
	//
	//   TypeQueryNode:
	//
	//   MappedTypeNode:
	//       `{` MappedTypePrefix? MappedTypePropertyName MappedTypeSuffix? `:` Type[~Extends] `;` `}`
	//
	//   MappedTypePrefix:
	//       `readonly`
	//       `+` `readonly`
	//       `-` `readonly`
	//
	//   MappedTypePropertyName:
	//       `[` BindingIdentifier `in` Type[~Extends] `]`
	//       `[` BindingIdentifier `in` Type[~Extends] `as` Type[~Extends] `]`
	//
	//   MappedTypeSuffix:
	//       `?`
	//       `+` `?`
	//       `-` `?`
	//
	//   TypeLiteralNode:
	//       `{` TypeElementList `}`
	//
	//   TypeElementList:
	//       [empty]
	//       TypeElementList TypeElement
	//
	//   TypeElement:
	//       PropertySignatureDeclaration
	//       MethodSignatureDeclaration
	//       IndexSignatureDeclaration
	//       CallSignatureDeclaration
	//       ConstructSignatureDeclaration
	//
	//   PropertySignatureDeclaration:
	//       PropertyName `?`? TypeAnnotation? `;`
	//
	//   MethodSignatureDeclaration:
	//       PropertyName `?`? TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;`
	//       `get` PropertyName TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;` // GetAccessorDeclaration
	//       `set` PropertyName TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;` // SetAccessorDeclaration
	//
	//   IndexSignatureDeclaration:
	//       `[` IdentifierName`]` TypeAnnotation `;`
	//
	//   CallSignatureDeclaration:
	//       TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;`
	//
	//   ConstructSignatureDeclaration:
	//       `new` TypeParameters? `(` FormalParameterList `)` TypeAnnotation? `;`
	//
	//   TupleTypeNode:
	//       `[` `]`
	//       `[` NamedTupleElementTypes `,`? `]`
	//       `[` TupleElementTypes `,`? `]`
	//
	//   NamedTupleElementTypes:
	//       NamedTupleMember
	//       NamedTupleElementTypes `,` NamedTupleMember
	//
	//   NamedTupleMember:
	//       IdentifierName `?`? `:` Type[~Extends]
	//       `...` IdentifierName `:` Type[~Extends]
	//
	//   TupleElementTypes:
	//       TupleElementType
	//       TupleElementTypes `,` TupleElementType
	//
	//   TupleElementType:
	//       Type[~Extends]
	//       OptionalTypeNode
	//       RestTypeNode
	//
	//   RestTypeNode:
	//       `...` Type[~Extends]
	//
	//   ParenthesizedTypeNode:
	//       `(` Type[~Extends] `)`
	//
	//   TypePredicateNode:
	//       `asserts`? TypePredicateParameterName
	//       `asserts`? TypePredicateParameterName `is` Type[~Extends]
	//
	//   TypePredicateParameterName:
	//       `this`
	//       IdentifierReference
	//
	//   TypeReferenceNode:
	//       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 *AssertsKeyword // Optional
	ParameterName   *TypePredicateParameterName
	Type            *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 TypePredicateNodeNode

type TypePredicateNodeNode = Node

type TypePredicateParameterName

type TypePredicateParameterName = Node // Identifier | ThisTypeNode

type TypeQueryNode

type TypeQueryNode struct {
	NodeWithTypeArgumentsBase
	ExprName *EntityName
}

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 TypeQueryNodeNode

type TypeQueryNodeNode = Node

type TypeReferenceNode

type TypeReferenceNode struct {
	NodeWithTypeArgumentsBase
	TypeName *EntityName
}

func (*TypeReferenceNode) Clone

func (*TypeReferenceNode) ForEachChild

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

func (*TypeReferenceNode) VisitEachChild

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

type TypeReferenceNodeNode

type TypeReferenceNodeNode = Node

type TypeSyntaxBase

type TypeSyntaxBase struct{}

type UnaryExpressionBase

type UnaryExpressionBase struct {
	ExpressionBase
}

type UnionOrIntersectionTypeNode

type UnionOrIntersectionTypeNode = Node // UnionTypeNode | IntersectionTypeNode

type UnionOrIntersectionTypeNodeBase

type UnionOrIntersectionTypeNodeBase struct {
	TypeNodeBase
	Types *TypeList
}

type UnionTypeNode

type UnionTypeNode struct {
	TypeNodeBase
	UnionOrIntersectionTypeNodeBase
}

func (*UnionTypeNode) Clone

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

func (*UnionTypeNode) ForEachChild

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

func (*UnionTypeNode) VisitEachChild

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

type UnionTypeNodeNode

type UnionTypeNodeNode = Node

type UpdateExpressionBase

type UpdateExpressionBase struct {
	UnaryExpressionBase
}

type ValidImportTypeNode

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

type VariableDeclaration

type VariableDeclaration struct {
	NodeBase
	DeclarationBase
	ExportableBase
	CompositeBase

	ExclamationToken *ExclamationToken // Optional
	Type             *TypeNode         // Optional
	Initializer      *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
	CompositeBase
	Declarations *VariableDeclarationNodeList
}

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 VariableOrParameterDeclaration

type VariableOrParameterDeclaration = Node // VariableDeclaration | ParameterDeclaration

type VariableOrPropertyDeclaration

type VariableOrPropertyDeclaration = Node // VariableDeclaration | PropertyDeclaration

type VariableStatement

type VariableStatement struct {
	StatementBase
	ModifiersBase
	CompositeBase
	DeclarationList *VariableDeclarationListNode
}

func (*VariableStatement) Clone

func (*VariableStatement) ForEachChild

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

func (*VariableStatement) VisitEachChild

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

type VariableStatementNode

type VariableStatementNode = Node

type Visitor

type Visitor func(*Node) bool

type VoidExpression

type VoidExpression struct {
	UnaryExpressionBase
	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 VoidExpressionNode

type VoidExpressionNode = Node

type WhileStatement

type WhileStatement struct {
	IterationStatementBase
	CompositeBase
	Expression *Expression
}

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 WhileStatementNode

type WhileStatementNode = Node

type WithStatement

type WithStatement struct {
	StatementBase
	CompositeBase
	Expression *Expression
	Statement  *Statement
}

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 WithStatementNode

type WithStatementNode = Node

type YieldExpression

type YieldExpression struct {
	ExpressionBase
	AsteriskToken *AsteriskToken // Optional
	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

type YieldExpressionNode

type YieldExpressionNode = Node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL