@@ -1448,6 +1448,10 @@ func (n *Node) AsNotEmittedStatement() *NotEmittedStatement {
1448
1448
return n .data .(* NotEmittedStatement )
1449
1449
}
1450
1450
1451
+ func (n * Node ) AsNotEmittedTypeElement () * NotEmittedTypeElement {
1452
+ return n .data .(* NotEmittedTypeElement )
1453
+ }
1454
+
1451
1455
func (n * Node ) AsJSDoc () * JSDoc {
1452
1456
return n .data .(* JSDoc )
1453
1457
}
@@ -4035,6 +4039,28 @@ func IsNotEmittedStatement(node *Node) bool {
4035
4039
return node .Kind == KindNotEmittedStatement
4036
4040
}
4037
4041
4042
+ // NotEmittedTypeElement
4043
+
4044
+ // Represents a type element that is elided as part of a transformation to emit comments on a
4045
+ // not-emitted node.
4046
+ type NotEmittedTypeElement struct {
4047
+ NodeBase
4048
+ TypeElementBase
4049
+ }
4050
+
4051
+ func (f * NodeFactory ) NewNotEmittedTypeElement () * Node {
4052
+ data := & NotEmittedTypeElement {}
4053
+ return newNode (KindNotEmittedTypeElement , data , f .hooks )
4054
+ }
4055
+
4056
+ func (node * NotEmittedTypeElement ) Clone (f NodeFactoryCoercible ) * Node {
4057
+ return cloneNode (f .AsNodeFactory ().NewNotEmittedTypeElement (), node .AsNode (), f .AsNodeFactory ().hooks )
4058
+ }
4059
+
4060
+ func IsNotEmittedTypeElement (node * Node ) bool {
4061
+ return node .Kind == KindNotEmittedTypeElement
4062
+ }
4063
+
4038
4064
// ImportEqualsDeclaration
4039
4065
4040
4066
type ImportEqualsDeclaration struct {
@@ -9925,7 +9951,7 @@ type SourceFile struct {
9925
9951
UsesUriStyleNodeCoreModules core.Tristate
9926
9952
Identifiers map [string ]string
9927
9953
IdentifierCount int
9928
- Imports []* LiteralLikeNode // []LiteralLikeNode
9954
+ imports []* LiteralLikeNode // []LiteralLikeNode
9929
9955
ModuleAugmentations []* ModuleName // []ModuleName
9930
9956
AmbientModuleNames []string
9931
9957
CommentDirectives []CommentDirective
@@ -9996,6 +10022,14 @@ func (node *SourceFile) Path() tspath.Path {
9996
10022
return node .path
9997
10023
}
9998
10024
10025
+ func (node * SourceFile ) OriginalFileName () string {
10026
+ return node .FileName () // !!! redirect source files
10027
+ }
10028
+
10029
+ func (node * SourceFile ) Imports () []* LiteralLikeNode {
10030
+ return node .imports
10031
+ }
10032
+
9999
10033
func (node * SourceFile ) Diagnostics () []* Diagnostic {
10000
10034
return node .diagnostics
10001
10035
}
@@ -10036,6 +10070,10 @@ func (node *SourceFile) VisitEachChild(v *NodeVisitor) *Node {
10036
10070
return v .Factory .UpdateSourceFile (node , v .visitTopLevelStatements (node .Statements ))
10037
10071
}
10038
10072
10073
+ func (node * SourceFile ) IsJS () bool {
10074
+ return IsSourceFileJS (node )
10075
+ }
10076
+
10039
10077
func (node * SourceFile ) copyFrom (other * SourceFile ) {
10040
10078
// Do not copy fields set by NewSourceFile (Text, FileName, Path, or Statements)
10041
10079
node .LanguageVersion = other .LanguageVersion
@@ -10045,7 +10083,7 @@ func (node *SourceFile) copyFrom(other *SourceFile) {
10045
10083
node .HasNoDefaultLib = other .HasNoDefaultLib
10046
10084
node .UsesUriStyleNodeCoreModules = other .UsesUriStyleNodeCoreModules
10047
10085
node .Identifiers = other .Identifiers
10048
- node .Imports = other .Imports
10086
+ node .imports = other .imports
10049
10087
node .ModuleAugmentations = other .ModuleAugmentations
10050
10088
node .AmbientModuleNames = other .AmbientModuleNames
10051
10089
node .CommentDirectives = other .CommentDirectives
0 commit comments