@@ -680,7 +680,7 @@ module.exports = function(ast, extra) {
680
680
function deeplyCopy ( ) {
681
681
result . type = "TS" + SyntaxKind [ node . kind ] ;
682
682
Object . keys ( node ) . filter ( function ( key ) {
683
- return ! ( / ^ (?: k i n d | p a r e n t | p o s | e n d | f l a g s ) $ / . test ( key ) ) ;
683
+ return ! ( / ^ (?: k i n d | p a r e n t | p o s | e n d | f l a g s | m o d i f i e r F l a g s C a c h e ) $ / . test ( key ) ) ;
684
684
} ) . forEach ( function ( key ) {
685
685
if ( key === "type" ) {
686
686
result . typeAnnotation = ( node . type ) ? convertTypeAnnotation ( node . type ) : null ;
@@ -1083,7 +1083,7 @@ module.exports = function(ast, extra) {
1083
1083
key : convertChild ( node . name ) ,
1084
1084
value : convertChild ( node . initializer ) ,
1085
1085
computed : ( node . name . kind === SyntaxKind . ComputedPropertyName ) ,
1086
- static : Boolean ( node . flags & ts . NodeFlags . Static ) ,
1086
+ static : Boolean ( ts . getModifierFlags ( node ) & ts . ModifierFlags . Static ) ,
1087
1087
accessibility : getTSNodeAccessibility ( node ) ,
1088
1088
decorators : ( node . decorators ) ? node . decorators . map ( function ( d ) {
1089
1089
return convertChild ( d . expression ) ;
@@ -1166,7 +1166,7 @@ module.exports = function(ast, extra) {
1166
1166
key : convertChild ( node . name ) ,
1167
1167
value : method ,
1168
1168
computed : isMethodNameComputed ,
1169
- static : Boolean ( node . flags & ts . NodeFlags . Static ) ,
1169
+ static : Boolean ( ts . getModifierFlags ( node ) & ts . ModifierFlags . Static ) ,
1170
1170
kind : "method" ,
1171
1171
accessibility : getTSNodeAccessibility ( node ) ,
1172
1172
decorators : ( node . decorators ) ? node . decorators . map ( function ( d ) {
@@ -1188,7 +1188,7 @@ module.exports = function(ast, extra) {
1188
1188
// TypeScript uses this even for static methods named "constructor"
1189
1189
case SyntaxKind . Constructor :
1190
1190
1191
- var constructorIsStatic = Boolean ( node . flags & ts . NodeFlags . Static ) ,
1191
+ var constructorIsStatic = Boolean ( ts . getModifierFlags ( node ) & ts . ModifierFlags . Static ) ,
1192
1192
firstConstructorToken = constructorIsStatic ? ts . findNextToken ( node . getFirstToken ( ) , ast ) : node . getFirstToken ( ) ,
1193
1193
constructorLoc = ast . getLineAndCharacterOfPosition ( node . parameters . pos - 1 ) ,
1194
1194
constructor = {
@@ -1441,8 +1441,8 @@ module.exports = function(ast, extra) {
1441
1441
1442
1442
// Patterns
1443
1443
1444
- // Note: TypeScript uses this for both spread and rest expressions
1445
- case SyntaxKind . SpreadElementExpression :
1444
+ case SyntaxKind . SpreadElement :
1445
+ case SyntaxKind . SpreadAssignment :
1446
1446
assign ( result , {
1447
1447
type : "SpreadElement" ,
1448
1448
argument : convertChild ( node . expression )
0 commit comments