switch babylon tests to fixtures
This commit is contained in:
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
interface A {}
|
||||
62
packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/expected.json
vendored
Normal file
62
packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/expected.json
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "InterfaceDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "A",
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"body": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"properties": [],
|
||||
"indexers": [],
|
||||
"callProperties": [],
|
||||
"range": [
|
||||
12,
|
||||
14
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"extends": [],
|
||||
"range": [
|
||||
0,
|
||||
14
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
interface A extends B {}
|
||||
99
packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/expected.json
vendored
Normal file
99
packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/expected.json
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "InterfaceDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "A",
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"body": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"properties": [],
|
||||
"indexers": [],
|
||||
"callProperties": [],
|
||||
"range": [
|
||||
22,
|
||||
24
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 22
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
},
|
||||
"extends": [
|
||||
{
|
||||
"type": "InterfaceExtends",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "B",
|
||||
"range": [
|
||||
20,
|
||||
21
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 20
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
20,
|
||||
21
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 20
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
24
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
interface A<T> extends B<T>, C<T> {}
|
||||
279
packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/expected.json
vendored
Normal file
279
packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/expected.json
vendored
Normal file
@@ -0,0 +1,279 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "InterfaceDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "A",
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterDeclaration",
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
"name": "T",
|
||||
"range": [
|
||||
12,
|
||||
13
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
11,
|
||||
14
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"properties": [],
|
||||
"indexers": [],
|
||||
"callProperties": [],
|
||||
"range": [
|
||||
34,
|
||||
36
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 34
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 36
|
||||
}
|
||||
}
|
||||
},
|
||||
"extends": [
|
||||
{
|
||||
"type": "InterfaceExtends",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "B",
|
||||
"range": [
|
||||
23,
|
||||
24
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "T",
|
||||
"range": [
|
||||
25,
|
||||
26
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 26
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
25,
|
||||
26
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 26
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
24,
|
||||
27
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
27
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "InterfaceExtends",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "C",
|
||||
"range": [
|
||||
29,
|
||||
30
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 29
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 30
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "T",
|
||||
"range": [
|
||||
31,
|
||||
32
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 32
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
31,
|
||||
32
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 32
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
30,
|
||||
33
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 30
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 33
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
33
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 29
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 33
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
36
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 36
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
interface A { foo: () => number; }
|
||||
135
packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/expected.json
vendored
Normal file
135
packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/expected.json
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "InterfaceDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "A",
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"body": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"properties": [
|
||||
{
|
||||
"type": "ObjectTypeProperty",
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"name": "foo",
|
||||
"range": [
|
||||
14,
|
||||
17
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 17
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"params": [],
|
||||
"returnType": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"range": [
|
||||
25,
|
||||
31
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
}
|
||||
},
|
||||
"optional": false,
|
||||
"range": [
|
||||
14,
|
||||
32
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 32
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexers": [],
|
||||
"callProperties": [],
|
||||
"range": [
|
||||
12,
|
||||
34
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 34
|
||||
}
|
||||
}
|
||||
},
|
||||
"extends": [],
|
||||
"range": [
|
||||
0,
|
||||
34
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 34
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
interface Dictionary { [index: string]: string; length: number; }
|
||||
186
packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/expected.json
vendored
Normal file
186
packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/expected.json
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "InterfaceDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Dictionary",
|
||||
"range": [
|
||||
10,
|
||||
20
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"body": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"properties": [
|
||||
{
|
||||
"type": "ObjectTypeProperty",
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"name": "length",
|
||||
"range": [
|
||||
48,
|
||||
54
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 48
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 54
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"range": [
|
||||
56,
|
||||
62
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 56
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 62
|
||||
}
|
||||
}
|
||||
},
|
||||
"optional": false,
|
||||
"range": [
|
||||
48,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 48
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 63
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"indexers": [
|
||||
{
|
||||
"type": "ObjectTypeIndexer",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "index",
|
||||
"range": [
|
||||
24,
|
||||
29
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 29
|
||||
}
|
||||
}
|
||||
},
|
||||
"key": {
|
||||
"type": "StringTypeAnnotation",
|
||||
"range": [
|
||||
31,
|
||||
37
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 31
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 37
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "StringTypeAnnotation",
|
||||
"range": [
|
||||
40,
|
||||
46
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 40
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 46
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
47
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 23
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 47
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callProperties": [],
|
||||
"range": [
|
||||
21,
|
||||
65
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 65
|
||||
}
|
||||
}
|
||||
},
|
||||
"extends": [],
|
||||
"range": [
|
||||
0,
|
||||
65
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 65
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/6/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/6/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
class Foo implements Bar {}
|
||||
97
packages/babylon/test/fixtures/flow/interfaces-module-and-script/6/expected.json
vendored
Normal file
97
packages/babylon/test/fixtures/flow/interfaces-module-and-script/6/expected.json
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Foo",
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"body": [],
|
||||
"range": [
|
||||
25,
|
||||
27
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
},
|
||||
"implements": [
|
||||
{
|
||||
"type": "ClassImplements",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Bar",
|
||||
"range": [
|
||||
21,
|
||||
24
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
21,
|
||||
24
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/7/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/7/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
class Foo extends Bar implements Bat, Man<number> {}
|
||||
185
packages/babylon/test/fixtures/flow/interfaces-module-and-script/7/expected.json
vendored
Normal file
185
packages/babylon/test/fixtures/flow/interfaces-module-and-script/7/expected.json
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Foo",
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"superClass": {
|
||||
"type": "Identifier",
|
||||
"name": "Bar",
|
||||
"range": [
|
||||
18,
|
||||
21
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"body": [],
|
||||
"range": [
|
||||
50,
|
||||
52
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 50
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 52
|
||||
}
|
||||
}
|
||||
},
|
||||
"implements": [
|
||||
{
|
||||
"type": "ClassImplements",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Bat",
|
||||
"range": [
|
||||
33,
|
||||
36
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 33
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 36
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
33,
|
||||
36
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 33
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 36
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ClassImplements",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Man",
|
||||
"range": [
|
||||
38,
|
||||
41
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 38
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 41
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"params": [
|
||||
{
|
||||
"type": "NumberTypeAnnotation",
|
||||
"range": [
|
||||
42,
|
||||
48
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 42
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 48
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
41,
|
||||
49
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 41
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 49
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
38,
|
||||
49
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 38
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 49
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
52
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 52
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/8/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/8/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
class Foo extends class Bar implements Bat {} {}
|
||||
150
packages/babylon/test/fixtures/flow/interfaces-module-and-script/8/expected.json
vendored
Normal file
150
packages/babylon/test/fixtures/flow/interfaces-module-and-script/8/expected.json
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Foo",
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"superClass": {
|
||||
"type": "ClassExpression",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Bar",
|
||||
"range": [
|
||||
24,
|
||||
27
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"body": [],
|
||||
"range": [
|
||||
43,
|
||||
45
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 43
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 45
|
||||
}
|
||||
}
|
||||
},
|
||||
"implements": [
|
||||
{
|
||||
"type": "ClassImplements",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Bat",
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 39
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 42
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 39
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 42
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
18,
|
||||
45
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 45
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"body": [],
|
||||
"range": [
|
||||
46,
|
||||
48
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 46
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 48
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
48
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 48
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/9/actual.js
vendored
Normal file
1
packages/babylon/test/fixtures/flow/interfaces-module-and-script/9/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
class Foo extends class Bar implements Bat {} implements Man {}
|
||||
188
packages/babylon/test/fixtures/flow/interfaces-module-and-script/9/expected.json
vendored
Normal file
188
packages/babylon/test/fixtures/flow/interfaces-module-and-script/9/expected.json
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
{
|
||||
"type": "Program",
|
||||
"body": [
|
||||
{
|
||||
"type": "ClassDeclaration",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Foo",
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"superClass": {
|
||||
"type": "ClassExpression",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Bar",
|
||||
"range": [
|
||||
24,
|
||||
27
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
},
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"body": [],
|
||||
"range": [
|
||||
43,
|
||||
45
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 43
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 45
|
||||
}
|
||||
}
|
||||
},
|
||||
"implements": [
|
||||
{
|
||||
"type": "ClassImplements",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Bat",
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 39
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 42
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 39
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 42
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
18,
|
||||
45
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 45
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"body": [],
|
||||
"range": [
|
||||
61,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 61
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 63
|
||||
}
|
||||
}
|
||||
},
|
||||
"implements": [
|
||||
{
|
||||
"type": "ClassImplements",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "Man",
|
||||
"range": [
|
||||
57,
|
||||
60
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 57
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 60
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null,
|
||||
"range": [
|
||||
57,
|
||||
60
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 57
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 60
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 63
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user