Add support for flow implements (#7741)

This commit is contained in:
Brian Ng 2018-04-18 08:54:30 -05:00 committed by GitHub
parent 2bded404f3
commit 3299086955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 1114 additions and 76 deletions

View File

@ -1,5 +1,5 @@
MAKEFLAGS = -j1
FLOW_COMMIT = 622bbc4f07acb77eb1109830c70815f827401d90
FLOW_COMMIT = f193e19cf2185006ea9139bb0e71f31ea93e7b72
TEST262_COMMIT = 52f70e2f637731aae92a9c9a2d831310c3ab2e1e
# Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967

View File

@ -228,6 +228,12 @@ export function _interfaceish(node: Object) {
this.space();
this.printList(node.mixins, node);
}
if (node.implements && node.implements.length) {
this.space();
this.word("implements");
this.space();
this.printList(node.implements, node);
}
this.space();
this.print(node.body, node);
}

View File

@ -0,0 +1,5 @@
class A implements B {}
class A implements B, C {}
declare class A implements B {}
declare class A mixins B implements C {}
declare class A implements B, C {}

View File

@ -0,0 +1,7 @@
class A implements B {}
class A implements B, C {}
declare class A implements B {}
declare class A mixins B implements C {}
declare class A implements B, C {}

View File

@ -433,6 +433,7 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `typeParameters`: `TypeParameterInstantiation` (default: `null`)
- `extends`: `Array<InterfaceExtends>` (default: `null`)
- `body`: `ObjectTypeAnnotation` (required)
- `implements`: `Array<ClassImplements>` (default: `null`)
- `mixins`: `Array<InterfaceExtends>` (default: `null`)
---
@ -492,9 +493,10 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id`: `Identifier` (required)
- `typeParameters`: `TypeParameterDeclaration` (default: `null`)
- `extends`: `InterfaceExtends` (default: `null`)
- `extends`: `Array<InterfaceExtends>` (default: `null`)
- `body`: `ObjectTypeAnnotation` (required)
- `mixins`: `Array<Flow>` (default: `null`)
- `implements`: `Array<ClassImplements>` (default: `null`)
- `mixins`: `Array<InterfaceExtends>` (default: `null`)
---
@ -1038,8 +1040,9 @@ Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration`
- `id`: `Identifier` (required)
- `typeParameters`: `TypeParameterDeclaration` (default: `null`)
- `extends`: `Array<InterfaceExtends>` (required)
- `extends`: `Array<InterfaceExtends>` (default: `null`)
- `body`: `ObjectTypeAnnotation` (required)
- `implements`: `Array<ClassImplements>` (default: `null`)
- `mixins`: `Array<InterfaceExtends>` (default: `null`)
---

View File

@ -9,6 +9,32 @@ import defineType, {
validateType,
} from "./utils";
const defineInterfaceishType = (
name: string,
typeParameterType: string = "TypeParameterDeclaration",
) => {
defineType(name, {
builder: ["id", "typeParameters", "extends", "body"],
visitor: [
"id",
"typeParameters",
"extends",
"mixins",
"implements",
"body",
],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
fields: {
id: validateType("Identifier"),
typeParameters: validateOptionalType(typeParameterType),
extends: validateOptional(arrayOfType("InterfaceExtends")),
mixins: validateOptional(arrayOfType("InterfaceExtends")),
implements: validateOptional(arrayOfType("ClassImplements")),
body: validateType("ObjectTypeAnnotation"),
},
});
};
defineType("AnyTypeAnnotation", {
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"],
});
@ -46,17 +72,7 @@ defineType("ClassImplements", {
},
});
defineType("DeclareClass", {
visitor: ["id", "typeParameters", "extends", "body"],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
fields: {
id: validateType("Identifier"),
typeParameters: validateOptionalType("TypeParameterInstantiation"),
extends: validateOptional(arrayOfType("InterfaceExtends")),
mixins: validateOptional(arrayOfType("InterfaceExtends")),
body: validateType("ObjectTypeAnnotation"),
},
});
defineInterfaceishType("DeclareClass", "TypeParameterInstantiation");
defineType("DeclareFunction", {
visitor: ["id"],
@ -67,17 +83,7 @@ defineType("DeclareFunction", {
},
});
defineType("DeclareInterface", {
visitor: ["id", "typeParameters", "extends", "body"],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
fields: {
id: validateType("Identifier"),
typeParameters: validateOptionalType("TypeParameterDeclaration"),
extends: validateOptionalType("InterfaceExtends"),
mixins: validateOptional(arrayOfType("Flow")),
body: validateType("ObjectTypeAnnotation"),
},
});
defineInterfaceishType("DeclareInterface");
defineType("DeclareModule", {
builder: ["id", "body", "kind"],
@ -203,17 +209,7 @@ defineType("InterfaceExtends", {
},
});
defineType("InterfaceDeclaration", {
visitor: ["id", "typeParameters", "extends", "body"],
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
fields: {
id: validateType("Identifier"),
typeParameters: validateOptionalType("TypeParameterDeclaration"),
extends: validate(arrayOfType("InterfaceExtends")),
mixins: validate(arrayOfType("InterfaceExtends")),
body: validateType("ObjectTypeAnnotation"),
},
});
defineInterfaceishType("InterfaceDeclaration");
defineType("IntersectionTypeAnnotation", {
visitor: ["types"],

View File

@ -403,6 +403,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
}
node.extends = [];
node.implements = [];
node.mixins = [];
if (this.eat(tt._extends)) {
@ -418,6 +419,13 @@ export default (superClass: Class<Parser>): Class<Parser> =>
} while (this.eat(tt.comma));
}
if (this.isContextual("implements")) {
this.next();
do {
node.implements.push(this.flowParseInterfaceExtends());
} while (this.eat(tt.comma));
}
node.body = this.flowParseObjectType(true, false, false);
}

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -0,0 +1 @@
class A implements B, C {}

View File

@ -0,0 +1,151 @@
{
"type": "File",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"program": {
"type": "Program",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"sourceType": "module",
"body": [
{
"type": "ClassDeclaration",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 7
},
"identifierName": "A"
},
"name": "A"
},
"superClass": null,
"implements": [
{
"type": "ClassImplements",
"start": 19,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 20
}
},
"id": {
"type": "Identifier",
"start": 19,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 20
},
"identifierName": "B"
},
"name": "B"
},
"typeParameters": null
},
{
"type": "ClassImplements",
"start": 22,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 23
}
},
"id": {
"type": "Identifier",
"start": 22,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 23
},
"identifierName": "C"
},
"name": "C"
},
"typeParameters": null
}
],
"body": {
"type": "ClassBody",
"start": 24,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 26
}
},
"body": []
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
class A implements B {}

View File

@ -0,0 +1,118 @@
{
"type": "File",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"program": {
"type": "Program",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"sourceType": "module",
"body": [
{
"type": "ClassDeclaration",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 7,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 7
},
"identifierName": "A"
},
"name": "A"
},
"superClass": null,
"implements": [
{
"type": "ClassImplements",
"start": 19,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 20
}
},
"id": {
"type": "Identifier",
"start": 19,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 20
},
"identifierName": "B"
},
"name": "B"
},
"typeParameters": null
}
],
"body": {
"type": "ClassBody",
"start": 21,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 23
}
},
"body": []
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
class A mixins B {}

View File

@ -0,0 +1,3 @@
{
"throws": "Unexpected token, expected \"{\" (1:8)"
}

View File

@ -0,0 +1 @@
declare class A implements B, C {}

View File

@ -0,0 +1,156 @@
{
"type": "File",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 34
}
},
"program": {
"type": "Program",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 34
}
},
"sourceType": "module",
"body": [
{
"type": "DeclareClass",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 34
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
},
"identifierName": "A"
},
"name": "A"
},
"typeParameters": null,
"extends": [],
"implements": [
{
"type": "InterfaceExtends",
"start": 27,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
}
},
"id": {
"type": "Identifier",
"start": 27,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
},
"identifierName": "B"
},
"name": "B"
},
"typeParameters": null
},
{
"type": "InterfaceExtends",
"start": 30,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 30
},
"end": {
"line": 1,
"column": 31
}
},
"id": {
"type": "Identifier",
"start": 30,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 30
},
"end": {
"line": 1,
"column": 31
},
"identifierName": "C"
},
"name": "C"
},
"typeParameters": null
}
],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
"start": 32,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 34
}
},
"callProperties": [],
"properties": [],
"indexers": [],
"exact": false
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
declare class A implements B mixins C {}

View File

@ -0,0 +1,3 @@
{
"throws": "Unexpected token, expected \"{\" (1:29)"
}

View File

@ -0,0 +1 @@
declare class A mixins B implements C {}

View File

@ -0,0 +1,157 @@
{
"type": "File",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"program": {
"type": "Program",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"sourceType": "module",
"body": [
{
"type": "DeclareClass",
"start": 0,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
},
"identifierName": "A"
},
"name": "A"
},
"typeParameters": null,
"extends": [],
"implements": [
{
"type": "InterfaceExtends",
"start": 36,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 36
},
"end": {
"line": 1,
"column": 37
}
},
"id": {
"type": "Identifier",
"start": 36,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 36
},
"end": {
"line": 1,
"column": 37
},
"identifierName": "C"
},
"name": "C"
},
"typeParameters": null
}
],
"mixins": [
{
"type": "InterfaceExtends",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"id": {
"type": "Identifier",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
},
"identifierName": "B"
},
"name": "B"
},
"typeParameters": null
}
],
"body": {
"type": "ObjectTypeAnnotation",
"start": 38,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 38
},
"end": {
"line": 1,
"column": 40
}
},
"callProperties": [],
"properties": [],
"indexers": [],
"exact": false
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
declare class A implements B {}

View File

@ -0,0 +1,123 @@
{
"type": "File",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"program": {
"type": "Program",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"sourceType": "module",
"body": [
{
"type": "DeclareClass",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
},
"identifierName": "A"
},
"name": "A"
},
"typeParameters": null,
"extends": [],
"implements": [
{
"type": "InterfaceExtends",
"start": 27,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
}
},
"id": {
"type": "Identifier",
"start": 27,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
},
"identifierName": "B"
},
"name": "B"
},
"typeParameters": null
}
],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
"start": 29,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 31
}
},
"callProperties": [],
"properties": [],
"indexers": [],
"exact": false
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
declare class A mixins B, C {}

View File

@ -0,0 +1,156 @@
{
"type": "File",
"start": 0,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 30
}
},
"program": {
"type": "Program",
"start": 0,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 30
}
},
"sourceType": "module",
"body": [
{
"type": "DeclareClass",
"start": 0,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 30
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
},
"identifierName": "A"
},
"name": "A"
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [
{
"type": "InterfaceExtends",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"id": {
"type": "Identifier",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
},
"identifierName": "B"
},
"name": "B"
},
"typeParameters": null
},
{
"type": "InterfaceExtends",
"start": 26,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 27
}
},
"id": {
"type": "Identifier",
"start": 26,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 27
},
"identifierName": "C"
},
"name": "C"
},
"typeParameters": null
}
],
"body": {
"type": "ObjectTypeAnnotation",
"start": 28,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 30
}
},
"callProperties": [],
"properties": [],
"indexers": [],
"exact": false
}
}
],
"directives": []
}
}

View File

@ -0,0 +1 @@
declare class A mixins B {}

View File

@ -0,0 +1,123 @@
{
"type": "File",
"start": 0,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 27
}
},
"program": {
"type": "Program",
"start": 0,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 27
}
},
"sourceType": "module",
"body": [
{
"type": "DeclareClass",
"start": 0,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 27
}
},
"id": {
"type": "Identifier",
"start": 14,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
},
"identifierName": "A"
},
"name": "A"
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [
{
"type": "InterfaceExtends",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"id": {
"type": "Identifier",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
},
"identifierName": "B"
},
"name": "B"
},
"typeParameters": null
}
],
"body": {
"type": "ObjectTypeAnnotation",
"start": 25,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 27
}
},
"callProperties": [],
"properties": [],
"indexers": [],
"exact": false
}
}
],
"directives": []
}
}

View File

@ -124,6 +124,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -75,6 +75,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -126,6 +126,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -126,6 +126,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -126,6 +126,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -107,6 +107,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [
{
"type": "InterfaceExtends",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -201,6 +202,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -159,6 +159,7 @@
"typeParameters": null
}
],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -165,6 +166,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -177,6 +177,7 @@
}
}
],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -95,6 +95,7 @@
"typeParameters": null
}
],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -259,6 +259,7 @@
}
}
],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -921,6 +921,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -1045,6 +1046,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -1169,6 +1171,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -1273,6 +1276,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -78,6 +78,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -251,6 +252,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -2106,6 +2106,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -2253,6 +2254,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -2417,6 +2419,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -2596,6 +2599,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -2698,6 +2702,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -2845,6 +2850,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -3009,6 +3015,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",
@ -3188,6 +3195,7 @@
]
},
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -61,6 +61,7 @@
},
"typeParameters": null,
"extends": [],
"implements": [],
"mixins": [],
"body": {
"type": "ObjectTypeAnnotation",

View File

@ -39,8 +39,6 @@ types/annotations_in_comments_invalid/migrated_0003.js
types/annotations/static_is_reserved_param.js
types/annotations/static_is_reserved_type.js
types/annotations/void_is_reserved_param.js
types/declare_export_invalid/migrated_0013.js
types/declare_statements_invalid/migrated_0001.js
types/member/reserved_words.js
types/number_literal_invalid/migrated_0000.js
types/parameter_defaults/migrated_0023.js
@ -52,3 +50,5 @@ types/parameter_defaults/migrated_0031.js
types/parameter_defaults/migrated_0032.js
types/string_literal_invalid/migrated_0000.js
types/typecasts_invalid/migrated_0001.js
class_method_kinds/polymorphic_getter.js
types/interfaces/prop_named_static.js

View File

@ -115,6 +115,7 @@ const flowOptionsMapping = {
esproposal_class_static_fields: "classProperties",
esproposal_export_star_as: "exportNamespaceFrom",
esproposal_decorators: "decorators",
esproposal_optional_chaining: "optionalChaining",
types: "flowComments",
};

View File

@ -1246,10 +1246,6 @@ assert@^1.1.1, assert@^1.4.0:
dependencies:
util "0.10.3"
assertion-error@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
assign-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
@ -1883,17 +1879,6 @@ center-align@^0.1.1:
align-text "^0.1.3"
lazy-cache "^1.0.3"
chai@^4.1.0:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
dependencies:
assertion-error "^1.0.1"
check-error "^1.0.1"
deep-eql "^3.0.0"
get-func-name "^2.0.0"
pathval "^1.0.0"
type-detect "^4.0.0"
chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
@ -1920,10 +1905,6 @@ chardet@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
check-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
cheerio@^1.0.0-rc.1:
version "1.0.0-rc.2"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db"
@ -2554,12 +2535,6 @@ dedent@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
deep-eql@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df"
dependencies:
type-detect "^4.0.0"
deep-extend@~0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f"
@ -3513,10 +3488,6 @@ get-caller-file@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
get-func-name@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
get-own-enumerable-property-symbols@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b"
@ -6217,10 +6188,6 @@ path-type@^3.0.0:
dependencies:
pify "^3.0.0"
pathval@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
pbkdf2@^3.0.3:
version "3.0.14"
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade"
@ -7634,10 +7601,6 @@ type-check@~0.3.2:
dependencies:
prelude-ls "~1.1.2"
type-detect@^4.0.0:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
typedarray@^0.0.6, typedarray@~0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"