@@ -617,7 +617,7 @@ module.exports = function(ast, extra) {
617
617
function deeplyCopy ( ) {
618
618
result . type = "TS" + SyntaxKind [ node . kind ] ;
619
619
Object . keys ( node ) . filter ( function ( key ) {
620
- return ! ( / ^ (?: k i n d | p a r e n t | p o s | e n d | f l a g s ) $ / . test ( key ) ) ;
620
+ 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 ) ) ;
621
621
} ) . forEach ( function ( key ) {
622
622
if ( key === "type" ) {
623
623
result . typeAnnotation = convertTypeAnnotation ( node . type ) ;
@@ -1037,7 +1037,7 @@ module.exports = function(ast, extra) {
1037
1037
key : convertChild ( node . name ) ,
1038
1038
value : convertChild ( node . initializer ) ,
1039
1039
computed : ( node . name . kind === SyntaxKind . ComputedPropertyName ) ,
1040
- static : Boolean ( node . flags & ts . NodeFlags . Static ) ,
1040
+ static : Boolean ( ts . getModifierFlags ( node ) & ts . ModifierFlags . Static ) ,
1041
1041
accessibility : getTSNodeAccessibility ( node ) ,
1042
1042
decorators : ( node . decorators ) ? node . decorators . map ( function ( d ) {
1043
1043
return convertChild ( d . expression ) ;
@@ -1119,7 +1119,7 @@ module.exports = function(ast, extra) {
1119
1119
key : convertChild ( node . name ) ,
1120
1120
value : method ,
1121
1121
computed : isMethodNameComputed ,
1122
- static : Boolean ( node . flags & ts . NodeFlags . Static ) ,
1122
+ static : Boolean ( ts . getModifierFlags ( node ) & ts . ModifierFlags . Static ) ,
1123
1123
kind : "method" ,
1124
1124
accessibility : getTSNodeAccessibility ( node ) ,
1125
1125
decorators : ( node . decorators ) ? node . decorators . map ( function ( d ) {
@@ -1141,7 +1141,7 @@ module.exports = function(ast, extra) {
1141
1141
// TypeScript uses this even for static methods named "constructor"
1142
1142
case SyntaxKind . Constructor :
1143
1143
1144
- var constructorIsStatic = Boolean ( node . flags & ts . NodeFlags . Static ) ,
1144
+ var constructorIsStatic = Boolean ( ts . getModifierFlags ( node ) & ts . ModifierFlags . Static ) ,
1145
1145
firstConstructorToken = constructorIsStatic ? ts . findNextToken ( node . getFirstToken ( ) , ast ) : node . getFirstToken ( ) ,
1146
1146
constructorOffset = 11 ,
1147
1147
constructorStartOffset = constructorOffset + firstConstructorToken . getStart ( ) - node . getFirstToken ( ) . getStart ( ) ,
@@ -1386,8 +1386,8 @@ module.exports = function(ast, extra) {
1386
1386
1387
1387
// Patterns
1388
1388
1389
- // Note: TypeScript uses this for both spread and rest expressions
1390
- case SyntaxKind . SpreadElementExpression :
1389
+ case SyntaxKind . SpreadElement :
1390
+ case SyntaxKind . SpreadAssignment :
1391
1391
assign ( result , {
1392
1392
type : "SpreadElement" ,
1393
1393
argument : convertChild ( node . expression )
0 commit comments