Skip to content

Commit f130ad0

Browse files
gkzmeta-codesync[bot]
authored andcommitted
[flow][parser] Rename ClassDeclaration property 'superTypeParameters' to 'superTypeArguments'
Summary: Changelog: [parser] Rename ClassDeclaration property 'superTypeParameters' to 'superTypeArguments' References: Request from Prettier folks: facebook/hermes#1808 (comment) TS-ESLint: typescript-eslint/typescript-eslint#5384 Babel: babel/babel#16997 Reviewed By: SamChou19815 Differential Revision: D86469027 fbshipit-source-id: abc26ab274d438e0d95f158c414f67c67984841e
1 parent 7d5f269 commit f130ad0

File tree

231 files changed

+514
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+514
-528
lines changed

packages/flow-parser/test/custom_ast_types.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ function custom_ast_types(fork) {
1717
const shared = fork.use(sharedPlugin);
1818
const defaults = shared.defaults;
1919

20+
def('ClassDeclaration').field(
21+
'superTypeArguments',
22+
or(def('TypeParameterInstantiation'), null),
23+
);
24+
2025
/////////
2126
// flow
2227
/////////

src/parser/estree_translator.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ with type t = Impl.t = struct
12921292
("body", class_body body);
12931293
("typeParameters", option type_parameter_declaration tparams);
12941294
("superClass", option expression super);
1295-
("superTypeParameters", option type_args super_targs);
1295+
("superTypeArguments", option type_args super_targs);
12961296
("implements", implements);
12971297
("decorators", array_of_list class_decorator class_decorators);
12981298
]

src/parser/test/flow/ES6/modules/export_default_class_implements.tree.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"typeParameters":null,
2222
"superClass":null,
23-
"superTypeParameters":null,
23+
"superTypeArguments":null,
2424
"implements":[
2525
{
2626
"type":"ClassImplements",

src/parser/test/flow/ES6/modules/migrated_0000.tree.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"typeParameters":null,
3535
"superClass":null,
36-
"superTypeParameters":null,
36+
"superTypeArguments":null,
3737
"implements":[],
3838
"decorators":[]
3939
},

src/parser/test/flow/ES6/modules/migrated_0001.tree.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"range":[17,19],
2626
"body":[]
2727
},
28-
"superClass":null,
2928
"typeParameters":null,
30-
"superTypeParameters":null,
29+
"superClass":null,
30+
"superTypeArguments":null,
3131
"implements":[],
3232
"decorators":[]
3333
},

src/parser/test/flow/ES6/modules/migrated_0002.tree.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"range":[21,23],
1919
"body":[]
2020
},
21-
"superClass":null,
2221
"typeParameters":null,
23-
"superTypeParameters":null,
22+
"superClass":null,
23+
"superTypeArguments":null,
2424
"implements":[],
2525
"decorators":[]
2626
},

src/parser/test/flow/ES6/modules/migrated_0003.tree.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"range":[23,25],
2626
"body":[]
2727
},
28-
"superClass":null,
2928
"typeParameters":null,
30-
"superTypeParameters":null,
29+
"superClass":null,
30+
"superTypeArguments":null,
3131
"implements":[],
3232
"decorators":[]
3333
},

src/parser/test/flow/ES6/modules/migrated_0015.tree.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232
"range":[68,70],
3333
"body":[]
3434
},
35+
"returnType":null,
36+
"typeParameters":null,
3537
"async":false,
3638
"generator":false,
3739
"predicate":null,
38-
"expression":false,
39-
"returnType":null,
40-
"typeParameters":null
40+
"expression":false
4141
},
4242
"specifiers":[],
4343
"source":null,
@@ -72,7 +72,7 @@
7272
},
7373
"typeParameters":null,
7474
"superClass":null,
75-
"superTypeParameters":null,
75+
"superTypeArguments":null,
7676
"implements":[],
7777
"decorators":[]
7878
},

src/parser/test/flow/ES6/modules/migrated_0024.tree.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
]
3737
},
3838
"superClass":null,
39-
"superTypeParameters":null,
39+
"superTypeArguments":null,
4040
"implements":[],
4141
"decorators":[]
4242
},

src/parser/test/flow/ES6/super-property/super-call-in-static-constructor.tree.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"typeAnnotation":null,
6666
"optional":false
6767
},
68+
"typeArguments":null,
6869
"arguments":[]
6970
},
7071
"directive":null
@@ -85,9 +86,9 @@
8586
}
8687
]
8788
},
88-
"superClass":null,
8989
"typeParameters":null,
90-
"superTypeParameters":null,
90+
"superClass":null,
91+
"superTypeArguments":null,
9192
"implements":[],
9293
"decorators":[]
9394
}

0 commit comments

Comments
 (0)