diff --git a/packages/babel-generator/src/generators/flow.js b/packages/babel-generator/src/generators/flow.js index 75a1147535..2aa5acb939 100644 --- a/packages/babel-generator/src/generators/flow.js +++ b/packages/babel-generator/src/generators/flow.js @@ -384,6 +384,7 @@ export function ObjectTypeAnnotation(node: Object) { const props = node.properties.concat( node.callProperties || [], node.indexers || [], + node.internalSlots || [], ); if (props.length) { @@ -413,6 +414,23 @@ export function ObjectTypeAnnotation(node: Object) { } } +export function ObjectTypeInternalSlot(node: Object) { + if (node.static) { + this.word("static"); + this.space(); + } + this.token("["); + this.token("["); + this.print(node.id, node); + this.token("]"); + this.token("]"); + if (!node.method) { + this.token(":"); + this.space(); + } + this.print(node.value, node); +} + export function ObjectTypeCallProperty(node: Object) { if (node.static) { this.word("static"); diff --git a/packages/babel-generator/src/node/whitespace.js b/packages/babel-generator/src/node/whitespace.js index ecc467b6cf..c9bf14750d 100644 --- a/packages/babel-generator/src/node/whitespace.js +++ b/packages/babel-generator/src/node/whitespace.js @@ -209,6 +209,22 @@ nodes.ObjectTypeIndexer = function(node: Object, parent): ?WhitespaceObject { } }; +nodes.ObjectTypeInternalSlot = function( + node: Object, + parent, +): ?WhitespaceObject { + if ( + parent.internalSlots[0] === node && + (!parent.properties || !parent.properties.length) && + (!parent.callProperties || !parent.callProperties.length) && + (!parent.indexers || !parent.indexers.length) + ) { + return { + before: true, + }; + } +}; + /** * Returns lists from node types that need whitespace. */ diff --git a/packages/babel-generator/test/fixtures/flow/internal-slot/input.js b/packages/babel-generator/test/fixtures/flow/internal-slot/input.js new file mode 100644 index 0000000000..e26a0046be --- /dev/null +++ b/packages/babel-generator/test/fixtures/flow/internal-slot/input.js @@ -0,0 +1,6 @@ +declare class C { static [[foo]]: T } +declare class C { [[foo]]: T } +interface T { [[foo]]: X } +interface T { [[foo]](): X } +type T = { [[foo]]: X } +type T = { [[foo]](): X } diff --git a/packages/babel-generator/test/fixtures/flow/internal-slot/output.js b/packages/babel-generator/test/fixtures/flow/internal-slot/output.js new file mode 100644 index 0000000000..61a87ea113 --- /dev/null +++ b/packages/babel-generator/test/fixtures/flow/internal-slot/output.js @@ -0,0 +1,18 @@ +declare class C { + static [[foo]]: T +} +declare class C { + [[foo]]: T +} +interface T { + [[foo]]: X +} +interface T { + [[foo]]() => X +} +type T = { + [[foo]]: X +}; +type T = { + [[foo]]() => X +}; \ No newline at end of file diff --git a/packages/babel-generator/test/index.js b/packages/babel-generator/test/index.js index 9b71e3311f..f09e4f091f 100644 --- a/packages/babel-generator/test/index.js +++ b/packages/babel-generator/test/index.js @@ -304,6 +304,7 @@ describe("programmatic generation", function() { [t.objectTypeProperty(t.identifier("bar"), t.stringTypeAnnotation())], null, null, + null, ); const output = generate(objectStatement).code; @@ -317,6 +318,7 @@ describe("programmatic generation", function() { [t.objectTypeProperty(t.identifier("bar"), t.stringTypeAnnotation())], null, null, + null, true, ); @@ -336,6 +338,7 @@ describe("programmatic generation", function() { t.numberTypeAnnotation(), ), ], + null, ); const output = generate(objectStatement).code; diff --git a/packages/babel-types/src/definitions/flow.js b/packages/babel-types/src/definitions/flow.js index 5d58b24681..caf33c2c9e 100644 --- a/packages/babel-types/src/definitions/flow.js +++ b/packages/babel-types/src/definitions/flow.js @@ -248,15 +248,22 @@ defineType("NumberTypeAnnotation", { }); defineType("ObjectTypeAnnotation", { - visitor: ["properties", "indexers", "callProperties"], + visitor: ["properties", "indexers", "callProperties", "internalSlots"], aliases: ["Flow", "FlowType"], - builder: ["properties", "indexers", "callProperties", "exact"], + builder: [ + "properties", + "indexers", + "callProperties", + "internalSlots", + "exact", + ], fields: { properties: validate( arrayOfType(["ObjectTypeProperty", "ObjectTypeSpreadProperty"]), ), indexers: validateOptional(arrayOfType("ObjectTypeIndexer")), callProperties: validateOptional(arrayOfType("ObjectTypeCallProperty")), + internalSlots: validateOptional(arrayOfType("ObjectTypeInternalSlot")), exact: { validate: assertValueType("boolean"), default: false, @@ -264,6 +271,17 @@ defineType("ObjectTypeAnnotation", { }, }); +defineType("ObjectTypeInternalSlot", { + visitor: ["id", "value", "static", "method"], + aliases: ["Flow", "UserWhitespacable"], + fields: { + id: validateType("Identifier"), + value: validateType("FlowType"), + static: validate(assertValueType("boolean")), + method: validate(assertValueType("boolean")), + }, +}); + defineType("ObjectTypeCallProperty", { visitor: ["value"], aliases: ["Flow", "UserWhitespacable"], diff --git a/packages/babylon/src/plugins/flow.js b/packages/babylon/src/plugins/flow.js index caa347207b..ddc81e9484 100644 --- a/packages/babylon/src/plugins/flow.js +++ b/packages/babylon/src/plugins/flow.js @@ -621,7 +621,7 @@ export default (superClass: Class): Class => ): N.FlowObjectTypeIndexer { node.static = isStatic; - this.expect(tt.bracketL); + // Note: bracketL has already been consumed if (this.lookahead().type === tt.colon) { node.id = this.flowParseObjectPropertyKey(); node.key = this.flowParseTypeInitialiser(); @@ -636,6 +636,27 @@ export default (superClass: Class): Class => return this.finishNode(node, "ObjectTypeIndexer"); } + flowParseObjectTypeInternalSlot( + node: N.FlowObjectTypeInternalSlot, + isStatic: boolean, + ): N.FlowObjectTypeInternalSlot { + node.static = isStatic; + // Note: both bracketL have already been consumed + node.id = this.flowParseObjectPropertyKey(); + this.expect(tt.bracketR); + this.expect(tt.bracketR); + if (this.isRelational("<") || this.match(tt.parenL)) { + node.method = true; + node.value = this.flowParseObjectTypeMethodish( + this.startNodeAt(node.start, node.loc.start), + ); + } else { + node.method = false; + node.value = this.flowParseTypeInitialiser(); + } + return this.finishNode(node, "ObjectTypeInternalSlot"); + } + flowParseObjectTypeMethodish( node: N.FlowFunctionTypeAnnotation, ): N.FlowFunctionTypeAnnotation { @@ -689,6 +710,7 @@ export default (superClass: Class): Class => nodeStart.callProperties = []; nodeStart.properties = []; nodeStart.indexers = []; + nodeStart.internalSlots = []; let endDelim; let exact; @@ -720,10 +742,19 @@ export default (superClass: Class): Class => const variance = this.flowParseVariance(); - if (this.match(tt.bracketL)) { - nodeStart.indexers.push( - this.flowParseObjectTypeIndexer(node, isStatic, variance), - ); + if (this.eat(tt.bracketL)) { + if (this.eat(tt.bracketL)) { + if (variance) { + this.unexpected(variance.start); + } + nodeStart.internalSlots.push( + this.flowParseObjectTypeInternalSlot(node, isStatic), + ); + } else { + nodeStart.indexers.push( + this.flowParseObjectTypeIndexer(node, isStatic, variance), + ); + } } else if (this.match(tt.parenL) || this.isRelational("<")) { if (variance) { this.unexpected(variance.start); diff --git a/packages/babylon/src/types.js b/packages/babylon/src/types.js index ee9bd93631..91a1535d7f 100644 --- a/packages/babylon/src/types.js +++ b/packages/babylon/src/types.js @@ -915,6 +915,7 @@ export type FlowInterfaceExtends = Node; export type FlowTypeAlias = Node; export type FlowOpaqueType = Node; export type FlowObjectTypeIndexer = Node; +export type FlowObjectTypeInternalSlot = Node; export type FlowFunctionTypeAnnotation = Node; export type FlowObjectTypeProperty = Node; export type FlowObjectTypeSpreadProperty = Node; diff --git a/packages/babylon/test/fixtures/flow/call-properties/1/output.json b/packages/babylon/test/fixtures/flow/call-properties/1/output.json index 6ea3d1e4bb..a8f731da4a 100644 --- a/packages/babylon/test/fixtures/flow/call-properties/1/output.json +++ b/packages/babylon/test/fixtures/flow/call-properties/1/output.json @@ -154,6 +154,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/call-properties/2/output.json b/packages/babylon/test/fixtures/flow/call-properties/2/output.json index 87148b542a..af04ce04dd 100644 --- a/packages/babylon/test/fixtures/flow/call-properties/2/output.json +++ b/packages/babylon/test/fixtures/flow/call-properties/2/output.json @@ -154,6 +154,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/call-properties/3/output.json b/packages/babylon/test/fixtures/flow/call-properties/3/output.json index fdc92e6b2b..2455ef16d7 100644 --- a/packages/babylon/test/fixtures/flow/call-properties/3/output.json +++ b/packages/babylon/test/fixtures/flow/call-properties/3/output.json @@ -305,6 +305,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/call-properties/4/output.json b/packages/babylon/test/fixtures/flow/call-properties/4/output.json index 08e9c26694..98ed1c12e8 100644 --- a/packages/babylon/test/fixtures/flow/call-properties/4/output.json +++ b/packages/babylon/test/fixtures/flow/call-properties/4/output.json @@ -254,6 +254,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/call-properties/5/output.json b/packages/babylon/test/fixtures/flow/call-properties/5/output.json index 306d17dc8c..c7b8b89bf7 100644 --- a/packages/babylon/test/fixtures/flow/call-properties/5/output.json +++ b/packages/babylon/test/fixtures/flow/call-properties/5/output.json @@ -130,6 +130,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/class-properties/getter-setter/output.json b/packages/babylon/test/fixtures/flow/class-properties/getter-setter/output.json index 9439a28902..a62d033d1a 100644 --- a/packages/babylon/test/fixtures/flow/class-properties/getter-setter/output.json +++ b/packages/babylon/test/fixtures/flow/class-properties/getter-setter/output.json @@ -654,6 +654,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/class-properties/named-static/output.json b/packages/babylon/test/fixtures/flow/class-properties/named-static/output.json index cb362f9359..d42ce47484 100644 --- a/packages/babylon/test/fixtures/flow/class-properties/named-static/output.json +++ b/packages/babylon/test/fixtures/flow/class-properties/named-static/output.json @@ -151,6 +151,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/comment/02-type-include/output.json b/packages/babylon/test/fixtures/flow/comment/02-type-include/output.json index bd476ff5d7..8f95c43077 100644 --- a/packages/babylon/test/fixtures/flow/comment/02-type-include/output.json +++ b/packages/babylon/test/fixtures/flow/comment/02-type-include/output.json @@ -234,6 +234,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/comment/03-type-flow-include/output.json b/packages/babylon/test/fixtures/flow/comment/03-type-flow-include/output.json index 05a7bcd068..4d0155be57 100644 --- a/packages/babylon/test/fixtures/flow/comment/03-type-flow-include/output.json +++ b/packages/babylon/test/fixtures/flow/comment/03-type-flow-include/output.json @@ -234,6 +234,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-class/implements-multiple/output.json b/packages/babylon/test/fixtures/flow/declare-class/implements-multiple/output.json index d542929729..9aae9f3dfb 100644 --- a/packages/babylon/test/fixtures/flow/declare-class/implements-multiple/output.json +++ b/packages/babylon/test/fixtures/flow/declare-class/implements-multiple/output.json @@ -147,6 +147,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-class/implements-with-mixin/output.json b/packages/babylon/test/fixtures/flow/declare-class/implements-with-mixin/output.json index 90a3ce2742..b7420ee2bb 100644 --- a/packages/babylon/test/fixtures/flow/declare-class/implements-with-mixin/output.json +++ b/packages/babylon/test/fixtures/flow/declare-class/implements-with-mixin/output.json @@ -148,6 +148,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-class/implements/output.json b/packages/babylon/test/fixtures/flow/declare-class/implements/output.json index 2b6e2f9226..147cd4723c 100644 --- a/packages/babylon/test/fixtures/flow/declare-class/implements/output.json +++ b/packages/babylon/test/fixtures/flow/declare-class/implements/output.json @@ -114,6 +114,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-class/mixins-multiple/output.json b/packages/babylon/test/fixtures/flow/declare-class/mixins-multiple/output.json index 2e0c40e321..0cc7bb6f63 100644 --- a/packages/babylon/test/fixtures/flow/declare-class/mixins-multiple/output.json +++ b/packages/babylon/test/fixtures/flow/declare-class/mixins-multiple/output.json @@ -147,6 +147,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-class/mixins/output.json b/packages/babylon/test/fixtures/flow/declare-class/mixins/output.json index 4dc1aceddf..976666c5aa 100644 --- a/packages/babylon/test/fixtures/flow/declare-class/mixins/output.json +++ b/packages/babylon/test/fixtures/flow/declare-class/mixins/output.json @@ -114,6 +114,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-export/export-class/output.json b/packages/babylon/test/fixtures/flow/declare-export/export-class/output.json index 98d369c164..0c677c578e 100644 --- a/packages/babylon/test/fixtures/flow/declare-export/export-class/output.json +++ b/packages/babylon/test/fixtures/flow/declare-export/export-class/output.json @@ -262,6 +262,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/declare-export/export-default-class/output.json b/packages/babylon/test/fixtures/flow/declare-export/export-default-class/output.json index 61983df103..d61334fe3e 100644 --- a/packages/babylon/test/fixtures/flow/declare-export/export-default-class/output.json +++ b/packages/babylon/test/fixtures/flow/declare-export/export-default-class/output.json @@ -94,6 +94,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/declare-export/export-interface-and-var/output.json b/packages/babylon/test/fixtures/flow/declare-export/export-interface-and-var/output.json index a5e525c737..afda6a4c4f 100644 --- a/packages/babylon/test/fixtures/flow/declare-export/export-interface-and-var/output.json +++ b/packages/babylon/test/fixtures/flow/declare-export/export-interface-and-var/output.json @@ -145,6 +145,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/declare-export/export-interface-commonjs/output.json b/packages/babylon/test/fixtures/flow/declare-export/export-interface-commonjs/output.json index 39e702dea8..ef1c280b06 100644 --- a/packages/babylon/test/fixtures/flow/declare-export/export-interface-commonjs/output.json +++ b/packages/babylon/test/fixtures/flow/declare-export/export-interface-commonjs/output.json @@ -145,6 +145,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/declare-export/export-interface/output.json b/packages/babylon/test/fixtures/flow/declare-export/export-interface/output.json index 423ce5adf1..e174a6e56d 100644 --- a/packages/babylon/test/fixtures/flow/declare-export/export-interface/output.json +++ b/packages/babylon/test/fixtures/flow/declare-export/export-interface/output.json @@ -145,6 +145,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/declare-module/10/output.json b/packages/babylon/test/fixtures/flow/declare-module/10/output.json index 36bd707144..8af394d53a 100644 --- a/packages/babylon/test/fixtures/flow/declare-module/10/output.json +++ b/packages/babylon/test/fixtures/flow/declare-module/10/output.json @@ -143,6 +143,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-module/5/output.json b/packages/babylon/test/fixtures/flow/declare-module/5/output.json index 5ce1498f42..cca82df7c2 100644 --- a/packages/babylon/test/fixtures/flow/declare-module/5/output.json +++ b/packages/babylon/test/fixtures/flow/declare-module/5/output.json @@ -196,6 +196,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-module/6/output.json b/packages/babylon/test/fixtures/flow/declare-module/6/output.json index c96803274c..2f3709e3c8 100644 --- a/packages/babylon/test/fixtures/flow/declare-module/6/output.json +++ b/packages/babylon/test/fixtures/flow/declare-module/6/output.json @@ -189,6 +189,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/10/output.json b/packages/babylon/test/fixtures/flow/declare-statements/10/output.json index 1bcf3e6e9e..7e7e652c21 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/10/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/10/output.json @@ -202,6 +202,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/11/output.json b/packages/babylon/test/fixtures/flow/declare-statements/11/output.json index 5c95cf2a5b..8c33bf543c 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/11/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/11/output.json @@ -145,6 +145,7 @@ "variance": null } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/12/output.json b/packages/babylon/test/fixtures/flow/declare-statements/12/output.json index 4460f260fb..388654aa76 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/12/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/12/output.json @@ -130,6 +130,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/13/output.json b/packages/babylon/test/fixtures/flow/declare-statements/13/output.json index b9f0125e9a..a39f0dea7f 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/13/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/13/output.json @@ -196,6 +196,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/14/output.json b/packages/babylon/test/fixtures/flow/declare-statements/14/output.json index ea11ee2d77..1f59abdb8e 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/14/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/14/output.json @@ -241,6 +241,7 @@ "variance": null } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/15/output.json b/packages/babylon/test/fixtures/flow/declare-statements/15/output.json index 3208fef5b5..e7e3eb938d 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/15/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/15/output.json @@ -133,6 +133,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -292,6 +293,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/16/output.json b/packages/babylon/test/fixtures/flow/declare-statements/16/output.json index 68a1978b51..d6199249d8 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/16/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/16/output.json @@ -178,6 +178,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/17/output.json b/packages/babylon/test/fixtures/flow/declare-statements/17/output.json index 3279562c14..13cddb011a 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/17/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/17/output.json @@ -237,6 +237,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/18/output.json b/packages/babylon/test/fixtures/flow/declare-statements/18/output.json index 3c4cd37283..40bbec8261 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/18/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/18/output.json @@ -130,6 +130,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -235,6 +236,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/7/output.json b/packages/babylon/test/fixtures/flow/declare-statements/7/output.json index 57e98a51ee..fc43fe1bee 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/7/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/7/output.json @@ -265,6 +265,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/8/output.json b/packages/babylon/test/fixtures/flow/declare-statements/8/output.json index 9ae134f7ae..0a000e7baf 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/8/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/8/output.json @@ -80,6 +80,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/declare-statements/9/output.json b/packages/babylon/test/fixtures/flow/declare-statements/9/output.json index 757e446721..152a0c09bf 100644 --- a/packages/babylon/test/fixtures/flow/declare-statements/9/output.json +++ b/packages/babylon/test/fixtures/flow/declare-statements/9/output.json @@ -249,6 +249,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/def-site-variance/1/output.json b/packages/babylon/test/fixtures/flow/def-site-variance/1/output.json index 5f77fd7ae9..9deb99b68b 100644 --- a/packages/babylon/test/fixtures/flow/def-site-variance/1/output.json +++ b/packages/babylon/test/fixtures/flow/def-site-variance/1/output.json @@ -420,6 +420,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/output.json index 2ea75fd807..0f6a20ca9f 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/1/output.json @@ -80,6 +80,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/10/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/10/output.json index 8bebb8ba55..0ee88d1a87 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/10/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/10/output.json @@ -235,6 +235,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/output.json index eb8ac60e38..695fffdf93 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/2/output.json @@ -114,6 +114,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/output.json index 9212a82374..54b8851e9a 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/3/output.json @@ -278,6 +278,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/output.json index 2705283764..e10d0594bf 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/4/output.json @@ -151,6 +151,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/output.json index 2114abd4bf..7bf080c87b 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/5/output.json @@ -198,6 +198,7 @@ "variance": null } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/id-reserved-value/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/id-reserved-value/output.json index 2fc2a10be8..980569d6bd 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/id-reserved-value/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/id-reserved-value/output.json @@ -80,6 +80,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/identifier-named-static-optional/output.json b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/identifier-named-static-optional/output.json index 036b95cb86..b035f457ed 100644 --- a/packages/babylon/test/fixtures/flow/interfaces-module-and-script/identifier-named-static-optional/output.json +++ b/packages/babylon/test/fixtures/flow/interfaces-module-and-script/identifier-named-static-optional/output.json @@ -133,6 +133,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/declare-class-static/input.js b/packages/babylon/test/fixtures/flow/internal-slot/declare-class-static/input.js new file mode 100644 index 0000000000..9ae853ad62 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/declare-class-static/input.js @@ -0,0 +1 @@ +declare class C { static [[foo]]: T } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/declare-class-static/output.json b/packages/babylon/test/fixtures/flow/internal-slot/declare-class-static/output.json new file mode 100644 index 0000000000..fd51f274b3 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/declare-class-static/output.json @@ -0,0 +1,158 @@ +{ + "type": "File", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "sourceType": "module", + "body": [ + { + "type": "DeclareClass", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "id": { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "C" + }, + "name": "C" + }, + "typeParameters": null, + "extends": [], + "implements": [], + "mixins": [], + "body": { + "type": "ObjectTypeAnnotation", + "start": 16, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [ + { + "type": "ObjectTypeInternalSlot", + "start": 18, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "static": true, + "id": { + "type": "Identifier", + "start": 27, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 30 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "method": false, + "value": { + "type": "GenericTypeAnnotation", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 35 + }, + "identifierName": "T" + }, + "name": "T" + } + } + } + ], + "exact": false + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/internal-slot/declare-class/input.js b/packages/babylon/test/fixtures/flow/internal-slot/declare-class/input.js new file mode 100644 index 0000000000..24dd359b9e --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/declare-class/input.js @@ -0,0 +1 @@ +declare class C { [[foo]]: T } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/declare-class/output.json b/packages/babylon/test/fixtures/flow/internal-slot/declare-class/output.json new file mode 100644 index 0000000000..30b1ff1fe9 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/declare-class/output.json @@ -0,0 +1,158 @@ +{ + "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": "C" + }, + "name": "C" + }, + "typeParameters": null, + "extends": [], + "implements": [], + "mixins": [], + "body": { + "type": "ObjectTypeAnnotation", + "start": 16, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [ + { + "type": "ObjectTypeInternalSlot", + "start": 18, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "static": false, + "id": { + "type": "Identifier", + "start": 20, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "method": false, + "value": { + "type": "GenericTypeAnnotation", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "T" + }, + "name": "T" + } + } + } + ], + "exact": false + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/internal-slot/interface-method/input.js b/packages/babylon/test/fixtures/flow/internal-slot/interface-method/input.js new file mode 100644 index 0000000000..ce9f3e4872 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/interface-method/input.js @@ -0,0 +1 @@ +interface T { [[foo]](): X } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/interface-method/output.json b/packages/babylon/test/fixtures/flow/internal-slot/interface-method/output.json new file mode 100644 index 0000000000..83ec869b9a --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/interface-method/output.json @@ -0,0 +1,176 @@ +{ + "type": "File", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "sourceType": "module", + "body": [ + { + "type": "InterfaceDeclaration", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "id": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "T" + }, + "name": "T" + }, + "typeParameters": null, + "extends": [], + "implements": [], + "mixins": [], + "body": { + "type": "ObjectTypeAnnotation", + "start": 12, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [ + { + "type": "ObjectTypeInternalSlot", + "start": 14, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "static": false, + "id": { + "type": "Identifier", + "start": 16, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 19 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "method": true, + "value": { + "type": "FunctionTypeAnnotation", + "start": 14, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "params": [], + "rest": null, + "typeParameters": null, + "returnType": { + "type": "GenericTypeAnnotation", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + }, + "identifierName": "X" + }, + "name": "X" + } + } + } + } + ], + "exact": false + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/internal-slot/interface-variance/input.js b/packages/babylon/test/fixtures/flow/internal-slot/interface-variance/input.js new file mode 100644 index 0000000000..2c51c5464e --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/interface-variance/input.js @@ -0,0 +1 @@ +interface T { +[[foo]](): X } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/interface-variance/options.json b/packages/babylon/test/fixtures/flow/internal-slot/interface-variance/options.json new file mode 100644 index 0000000000..d50e8469b8 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/interface-variance/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:14)" +} diff --git a/packages/babylon/test/fixtures/flow/internal-slot/interface/input.js b/packages/babylon/test/fixtures/flow/internal-slot/interface/input.js new file mode 100644 index 0000000000..ce1d513db5 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/interface/input.js @@ -0,0 +1 @@ +interface T { [[foo]]: X } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/interface/output.json b/packages/babylon/test/fixtures/flow/internal-slot/interface/output.json new file mode 100644 index 0000000000..bb9031963c --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/interface/output.json @@ -0,0 +1,158 @@ +{ + "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": "InterfaceDeclaration", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "id": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "T" + }, + "name": "T" + }, + "typeParameters": null, + "extends": [], + "implements": [], + "mixins": [], + "body": { + "type": "ObjectTypeAnnotation", + "start": 12, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [ + { + "type": "ObjectTypeInternalSlot", + "start": 14, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "static": false, + "id": { + "type": "Identifier", + "start": 16, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 19 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "method": false, + "value": { + "type": "GenericTypeAnnotation", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + }, + "identifierName": "X" + }, + "name": "X" + } + } + } + ], + "exact": false + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/internal-slot/object-method/input.js b/packages/babylon/test/fixtures/flow/internal-slot/object-method/input.js new file mode 100644 index 0000000000..193e329a1c --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/object-method/input.js @@ -0,0 +1 @@ +type T = { [[foo]](): X } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/object-method/output.json b/packages/babylon/test/fixtures/flow/internal-slot/object-method/output.json new file mode 100644 index 0000000000..a27cbbf6a2 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/object-method/output.json @@ -0,0 +1,173 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "module", + "body": [ + { + "type": "TypeAlias", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "id": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "T" + }, + "name": "T" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 9, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [ + { + "type": "ObjectTypeInternalSlot", + "start": 11, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "static": false, + "id": { + "type": "Identifier", + "start": 13, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "method": true, + "value": { + "type": "FunctionTypeAnnotation", + "start": 11, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "params": [], + "rest": null, + "typeParameters": null, + "returnType": { + "type": "GenericTypeAnnotation", + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "X" + }, + "name": "X" + } + } + } + } + ], + "exact": false + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/internal-slot/object-variance/input.js b/packages/babylon/test/fixtures/flow/internal-slot/object-variance/input.js new file mode 100644 index 0000000000..9e5318f912 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/object-variance/input.js @@ -0,0 +1 @@ +type T = { +[[foo]]: X } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/object-variance/options.json b/packages/babylon/test/fixtures/flow/internal-slot/object-variance/options.json new file mode 100644 index 0000000000..cb6c66081e --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/object-variance/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:11)" +} diff --git a/packages/babylon/test/fixtures/flow/internal-slot/object/input.js b/packages/babylon/test/fixtures/flow/internal-slot/object/input.js new file mode 100644 index 0000000000..6601e90896 --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/object/input.js @@ -0,0 +1 @@ +type T = { [[foo]]: X } diff --git a/packages/babylon/test/fixtures/flow/internal-slot/object/output.json b/packages/babylon/test/fixtures/flow/internal-slot/object/output.json new file mode 100644 index 0000000000..002d1abdfe --- /dev/null +++ b/packages/babylon/test/fixtures/flow/internal-slot/object/output.json @@ -0,0 +1,155 @@ +{ + "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": "TypeAlias", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "id": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "T" + }, + "name": "T" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 9, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [ + { + "type": "ObjectTypeInternalSlot", + "start": 11, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "static": false, + "id": { + "type": "Identifier", + "start": 13, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "method": false, + "value": { + "type": "GenericTypeAnnotation", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "X" + }, + "name": "X" + } + } + } + ], + "exact": false + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/flow/iterator/01/output.json b/packages/babylon/test/fixtures/flow/iterator/01/output.json index 3275f3a0b9..e12e269720 100644 --- a/packages/babylon/test/fixtures/flow/iterator/01/output.json +++ b/packages/babylon/test/fixtures/flow/iterator/01/output.json @@ -217,6 +217,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/iterator/02/output.json b/packages/babylon/test/fixtures/flow/iterator/02/output.json index 8d0a7d2c0f..8d4891d72d 100644 --- a/packages/babylon/test/fixtures/flow/iterator/02/output.json +++ b/packages/babylon/test/fixtures/flow/iterator/02/output.json @@ -217,6 +217,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/iterator/12/output.json b/packages/babylon/test/fixtures/flow/iterator/12/output.json index c599c26962..c0a408e78c 100644 --- a/packages/babylon/test/fixtures/flow/iterator/12/output.json +++ b/packages/babylon/test/fixtures/flow/iterator/12/output.json @@ -165,6 +165,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/iterator/13/output.json b/packages/babylon/test/fixtures/flow/iterator/13/output.json index 43ac1dab55..ff95cf2628 100644 --- a/packages/babylon/test/fixtures/flow/iterator/13/output.json +++ b/packages/babylon/test/fixtures/flow/iterator/13/output.json @@ -165,6 +165,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/iterator/14/output.json b/packages/babylon/test/fixtures/flow/iterator/14/output.json index 78e416e067..3403c5ce09 100644 --- a/packages/babylon/test/fixtures/flow/iterator/14/output.json +++ b/packages/babylon/test/fixtures/flow/iterator/14/output.json @@ -217,6 +217,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/iterator/15/output.json b/packages/babylon/test/fixtures/flow/iterator/15/output.json index 02ed08c46b..c5c9e4032e 100644 --- a/packages/babylon/test/fixtures/flow/iterator/15/output.json +++ b/packages/babylon/test/fixtures/flow/iterator/15/output.json @@ -217,6 +217,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/object-types/complex-param-types/output.json b/packages/babylon/test/fixtures/flow/object-types/complex-param-types/output.json index f74a8e1c53..617fe340fa 100644 --- a/packages/babylon/test/fixtures/flow/object-types/complex-param-types/output.json +++ b/packages/babylon/test/fixtures/flow/object-types/complex-param-types/output.json @@ -230,6 +230,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-alias/4/output.json b/packages/babylon/test/fixtures/flow/type-alias/4/output.json index 549a3e9f02..69682ac3f3 100644 --- a/packages/babylon/test/fixtures/flow/type-alias/4/output.json +++ b/packages/babylon/test/fixtures/flow/type-alias/4/output.json @@ -150,6 +150,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false }, { @@ -227,6 +228,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } ] @@ -618,6 +620,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false }, { @@ -695,6 +698,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } ] @@ -704,6 +708,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -879,6 +884,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false }, { @@ -956,6 +962,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } ] @@ -965,6 +972,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/108/output.json b/packages/babylon/test/fixtures/flow/type-annotations/108/output.json index 635352a145..a5dd5fc694 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/108/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/108/output.json @@ -209,6 +209,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": true } } @@ -525,6 +526,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": true } } @@ -736,6 +738,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": true } } @@ -991,6 +994,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": true }, "variance": null, @@ -1050,6 +1054,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } @@ -1519,6 +1524,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false }, "variance": null, @@ -1578,6 +1584,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": true } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/110/output.json b/packages/babylon/test/fixtures/flow/type-annotations/110/output.json index 5942b598e2..1dd92b8c0b 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/110/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/110/output.json @@ -163,6 +163,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/111/output.json b/packages/babylon/test/fixtures/flow/type-annotations/111/output.json index 4b3f7042a0..2cc443b0bf 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/111/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/111/output.json @@ -163,6 +163,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/114/output.json b/packages/babylon/test/fixtures/flow/type-annotations/114/output.json index 5cbe3ec43a..1c33baf64c 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/114/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/114/output.json @@ -193,6 +193,7 @@ } } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/115/output.json b/packages/babylon/test/fixtures/flow/type-annotations/115/output.json index cdb32af1e6..82eb32ad8a 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/115/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/115/output.json @@ -193,6 +193,7 @@ } } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/127/output.json b/packages/babylon/test/fixtures/flow/type-annotations/127/output.json index c9361209da..175daf7287 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/127/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/127/output.json @@ -126,6 +126,7 @@ "variance": null } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/128/output.json b/packages/babylon/test/fixtures/flow/type-annotations/128/output.json index 76203fc324..ef8de3380b 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/128/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/128/output.json @@ -158,6 +158,7 @@ "variance": null } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/135/output.json b/packages/babylon/test/fixtures/flow/type-annotations/135/output.json index 14027b107e..639a96cd00 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/135/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/135/output.json @@ -108,6 +108,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/136/output.json b/packages/babylon/test/fixtures/flow/type-annotations/136/output.json index c3b6a7458f..2ca17be7ba 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/136/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/136/output.json @@ -127,6 +127,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false }, "variance": null, @@ -163,11 +164,13 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/138/output.json b/packages/babylon/test/fixtures/flow/type-annotations/138/output.json index 3aabc9dfd3..ab131b6870 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/138/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/138/output.json @@ -274,6 +274,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/16/output.json b/packages/babylon/test/fixtures/flow/type-annotations/16/output.json index 501f89e149..2f20bb22b8 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/16/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/16/output.json @@ -94,6 +94,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/type-annotations/32/output.json b/packages/babylon/test/fixtures/flow/type-annotations/32/output.json index 200e435106..2574c05e29 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/32/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/32/output.json @@ -157,6 +157,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/33/output.json b/packages/babylon/test/fixtures/flow/type-annotations/33/output.json index b40e6d268f..12524fab2b 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/33/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/33/output.json @@ -157,6 +157,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/34/output.json b/packages/babylon/test/fixtures/flow/type-annotations/34/output.json index 5862b60835..bc1fc86fe4 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/34/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/34/output.json @@ -222,6 +222,7 @@ "variance": null } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/35/output.json b/packages/babylon/test/fixtures/flow/type-annotations/35/output.json index 0a41ba7cef..6fe98f2a53 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/35/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/35/output.json @@ -171,6 +171,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/36/output.json b/packages/babylon/test/fixtures/flow/type-annotations/36/output.json index 9903698b23..27601fd089 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/36/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/36/output.json @@ -209,6 +209,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/37/output.json b/packages/babylon/test/fixtures/flow/type-annotations/37/output.json index a46c2ceedc..df412ca1b7 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/37/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/37/output.json @@ -207,6 +207,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false }, "variance": null, @@ -214,6 +215,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/38/output.json b/packages/babylon/test/fixtures/flow/type-annotations/38/output.json index ee23ab7c2f..33d11c0cd5 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/38/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/38/output.json @@ -221,6 +221,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -229,6 +230,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/39/output.json b/packages/babylon/test/fixtures/flow/type-annotations/39/output.json index 1fcd44b9c3..69563566f6 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/39/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/39/output.json @@ -209,6 +209,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/40/output.json b/packages/babylon/test/fixtures/flow/type-annotations/40/output.json index a50f10e2c5..1402e592e3 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/40/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/40/output.json @@ -209,6 +209,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/41/output.json b/packages/babylon/test/fixtures/flow/type-annotations/41/output.json index af45a70ad3..da5d733292 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/41/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/41/output.json @@ -233,6 +233,7 @@ "variance": null } ], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/42/output.json b/packages/babylon/test/fixtures/flow/type-annotations/42/output.json index 2d89613fa7..38900318cc 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/42/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/42/output.json @@ -319,6 +319,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/43/output.json b/packages/babylon/test/fixtures/flow/type-annotations/43/output.json index 92e7df5a44..8433cc43d0 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/43/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/43/output.json @@ -292,6 +292,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/60/output.json b/packages/babylon/test/fixtures/flow/type-annotations/60/output.json index c511b67445..33ae3dbefc 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/60/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/60/output.json @@ -212,6 +212,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/61/output.json b/packages/babylon/test/fixtures/flow/type-annotations/61/output.json index 75d358a1f5..1f4e00eb22 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/61/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/61/output.json @@ -212,6 +212,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/63/output.json b/packages/babylon/test/fixtures/flow/type-annotations/63/output.json index 0c192add98..9ef7229e0a 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/63/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/63/output.json @@ -217,6 +217,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/98/output.json b/packages/babylon/test/fixtures/flow/type-annotations/98/output.json index f5f36f3a7d..6656be6a56 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/98/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/98/output.json @@ -261,6 +261,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-annotations/object-type-method/output.json b/packages/babylon/test/fixtures/flow/type-annotations/object-type-method/output.json index 3033b68e37..6e107d565a 100644 --- a/packages/babylon/test/fixtures/flow/type-annotations/object-type-method/output.json +++ b/packages/babylon/test/fixtures/flow/type-annotations/object-type-method/output.json @@ -148,6 +148,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -304,6 +305,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -426,6 +428,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -581,6 +584,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -683,6 +687,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -885,6 +890,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -1010,6 +1016,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -1135,6 +1142,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -1240,6 +1248,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -1345,6 +1354,7 @@ ], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-exports/interface/output.json b/packages/babylon/test/fixtures/flow/type-exports/interface/output.json index f8cc2f9749..8f59babc94 100644 --- a/packages/babylon/test/fixtures/flow/type-exports/interface/output.json +++ b/packages/babylon/test/fixtures/flow/type-exports/interface/output.json @@ -150,6 +150,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } @@ -342,6 +343,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-class-method-reserved-word/output.json b/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-class-method-reserved-word/output.json index 21c1ee39f8..eefea8c54a 100644 --- a/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-class-method-reserved-word/output.json +++ b/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-class-method-reserved-word/output.json @@ -897,6 +897,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-interface-method-reserved-word/output.json b/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-interface-method-reserved-word/output.json index c38e1e5f03..1d39fe9b29 100644 --- a/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-interface-method-reserved-word/output.json +++ b/packages/babylon/test/fixtures/flow/type-parameter-declaration/declare-interface-method-reserved-word/output.json @@ -489,6 +489,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/type-parameter-declaration/default/output.json b/packages/babylon/test/fixtures/flow/type-parameter-declaration/default/output.json index 2f5255f913..15a18ff9a2 100644 --- a/packages/babylon/test/fixtures/flow/type-parameter-declaration/default/output.json +++ b/packages/babylon/test/fixtures/flow/type-parameter-declaration/default/output.json @@ -2125,6 +2125,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -2273,6 +2274,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -2438,6 +2440,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -2618,6 +2621,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -2721,6 +2725,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -2869,6 +2874,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -3034,6 +3040,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, @@ -3214,6 +3221,7 @@ "callProperties": [], "properties": [], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/type-parameter-declaration/interface-reserved-word/output.json b/packages/babylon/test/fixtures/flow/type-parameter-declaration/interface-reserved-word/output.json index 2811767bec..933d7973df 100644 --- a/packages/babylon/test/fixtures/flow/type-parameter-declaration/interface-reserved-word/output.json +++ b/packages/babylon/test/fixtures/flow/type-parameter-declaration/interface-reserved-word/output.json @@ -489,6 +489,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/packages/babylon/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json b/packages/babylon/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json index b0f2ed8548..ab80eeca5b 100644 --- a/packages/babylon/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json +++ b/packages/babylon/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json @@ -486,6 +486,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } } diff --git a/packages/babylon/test/fixtures/flow/typecasts/2/output.json b/packages/babylon/test/fixtures/flow/typecasts/2/output.json index c42819ddfe..fa7eef5b04 100644 --- a/packages/babylon/test/fixtures/flow/typecasts/2/output.json +++ b/packages/babylon/test/fixtures/flow/typecasts/2/output.json @@ -319,6 +319,7 @@ } ], "indexers": [], + "internalSlots": [], "exact": false } }, diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index 322247aa30..74d9819c0d 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -31,9 +31,6 @@ types/member/reserved_words.js types/parameter_defaults/migrated_0032.js types/typecasts_invalid/migrated_0001.js class_method_kinds/polymorphic_getter.js -internal_slot/interface_method.js -internal_slot/object_method.js -internal_slot/object_variance.js numbers/underscored_bin.js numbers/underscored_float.js numbers/underscored_float_whole.js