))
- }
+ dyn: React.PropTypes.oneOf(([]: Array)),
+ },
});
; // OK
var DynamicElemExample = React.createClass({
propTypes: {
- dyn: React.PropTypes.oneOf(["foo", ("": string)])
- }
+ dyn: React.PropTypes.oneOf(["foo", ("": string)]),
+ },
});
; // OK
var InvalidArrayExample = React.createClass({
propTypes: {
- p: React.PropTypes.oneOf(0) // error: expected array, got 0
- }
+ p: React.PropTypes.oneOf(0), // error: expected array, got 0
+ },
});
; // OK, don't cascade errors
var NonLiteralElemExample = React.createClass({
propTypes: {
- p: React.PropTypes.oneOf([{}]) // OK: allow non-literals
- }
+ p: React.PropTypes.oneOf([{}]), // OK: allow non-literals
+ },
});
; // OK, result is unknown/any
@@ -1746,8 +1746,8 @@ var Example = React.createClass({
propTypes: {
prop: React.PropTypes.oneOfType([
React.PropTypes.string,
- React.PropTypes.number
- ]).isRequired
+ React.PropTypes.number,
+ ]).isRequired,
},
render() {
if (typeof this.props.prop === "string") {
@@ -1755,7 +1755,7 @@ var Example = React.createClass({
} else {
return {this.props.prop.toFixed(2)}
;
}
- }
+ },
});
var ok_number = ;
@@ -1771,8 +1771,8 @@ var todo_required = ;
var OptionalExample = React.createClass({
propTypes: {
- p: React.PropTypes.oneOfType([React.PropTypes.string])
- }
+ p: React.PropTypes.oneOfType([React.PropTypes.string]),
+ },
});
; // OK
@@ -1781,32 +1781,32 @@ var OptionalExample = React.createClass({
var EmptyExample = React.createClass({
propTypes: {
- nil: React.PropTypes.oneOfType([]) // i.e., \`empty\`
- }
+ nil: React.PropTypes.oneOfType([]), // i.e., \`empty\`
+ },
});
; // number ~> empty
var AnyArrayExample = React.createClass({
propTypes: {
- any: React.PropTypes.oneOfType((0: any))
- }
+ any: React.PropTypes.oneOfType((0: any)),
+ },
});
; // OK
var AnyElemExample = React.createClass({
propTypes: {
- any: React.PropTypes.oneOfType([React.PropTypes.string, (0: any)])
- }
+ any: React.PropTypes.oneOfType([React.PropTypes.string, (0: any)]),
+ },
});
; // OK
var DynamicArrayExample = React.createClass({
propTypes: {
- dyn: React.PropTypes.oneOfType(([]: Array))
- }
+ dyn: React.PropTypes.oneOfType(([]: Array)),
+ },
});
; // OK
@@ -1815,25 +1815,25 @@ var DynamicElemExample = React.createClass({
propTypes: {
dyn: React.PropTypes.oneOfType([
React.PropTypes.string,
- (() => {}: Function)
- ])
- }
+ (() => {}: Function),
+ ]),
+ },
});
; // OK
var InvalidArrayExample = React.createClass({
propTypes: {
- p: React.PropTypes.oneOfType(0) // error: expected array, got 0
- }
+ p: React.PropTypes.oneOfType(0), // error: expected array, got 0
+ },
});
; // OK, don't cascade errors
var InvalidElemExample = React.createClass({
propTypes: {
- p: React.PropTypes.oneOfType([{}]) // error: expected prop type, got {}
- }
+ p: React.PropTypes.oneOfType([{}]), // error: expected prop type, got {}
+ },
});
; // OK, don't cascade errors
@@ -1898,8 +1898,8 @@ import React from "react";
React.createClass({
propTypes: {
foo: React.PropTypes.shape({
- bar: React.PropTypes.string.isRequired
- }).isRequired
+ bar: React.PropTypes.string.isRequired,
+ }).isRequired,
},
f() {
@@ -1908,16 +1908,16 @@ React.createClass({
g() {
this.props.foo.baz = 0;
- }
+ },
});
React.createClass({
propTypes: {
- foo: React.PropTypes.shape(({}: { [string]: any })).isRequired
+ foo: React.PropTypes.shape(({}: { [string]: any })).isRequired,
},
f() {
(this.props.foo.bar: empty); // OK
- }
+ },
});
================================================================================
@@ -2034,7 +2034,7 @@ import React from "react";
React.createClass({
propTypes: {
- foo: React.PropTypes.string.isRequired
+ foo: React.PropTypes.string.isRequired,
},
f() {
@@ -2043,7 +2043,7 @@ React.createClass({
g() {
this.props.baz = 0;
- }
+ },
});
================================================================================
diff --git a/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap
index 9b2b6d282..f051ade9e 100644
--- a/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap
@@ -40,12 +40,12 @@ var Hello = require("./createclass-module");
var HelloLocal = React.createClass({
propTypes: {
- name: React.PropTypes.string.isRequired
+ name: React.PropTypes.string.isRequired,
},
render: function(): React.Element<*> {
return {this.props.name}
;
- }
+ },
});
var Callsite = React.createClass({
@@ -56,7 +56,7 @@ var Callsite = React.createClass({
);
- }
+ },
});
module.exports = Callsite;
@@ -91,12 +91,12 @@ var React = require("react");
var Hello = React.createClass({
propTypes: {
- name: React.PropTypes.string.isRequired
+ name: React.PropTypes.string.isRequired,
},
render: function(): React.Element<*> {
return {this.props.name}
;
- }
+ },
});
module.exports = Hello;
@@ -145,7 +145,7 @@ import Hello from "./es6class-proptypes-module";
class HelloLocal extends React.Component {
defaultProps = {};
propTypes = {
- name: React.PropTypes.string.isRequired
+ name: React.PropTypes.string.isRequired,
};
render(): React.Element<*> {
return {this.props.name}
;
@@ -197,7 +197,7 @@ import React from "react";
class Hello extends React.Component {
defaultProps = {};
propTypes = {
- name: React.PropTypes.string.isRequired
+ name: React.PropTypes.string.isRequired,
};
render(): React.Element<*> {
diff --git a/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap b/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap
index b870aa46c..37978ed6e 100644
--- a/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap
@@ -44,14 +44,14 @@ function bar2(y: F): F {
}
type Functor = {
- map(f: (val: A) => B): Functor
+ map(f: (val: A) => B): Functor,
};
function identity(val: A): Functor {
return {
map(f: (_: typeof val) => B): Functor {
return identity(f(val));
- }
+ },
};
}
@@ -79,7 +79,7 @@ function id(x: Task): Task { return x; }
type Task = {
chain(
next: (input: value) => Task
- ): Task
+ ): Task,
};
function id(x: Task): Task {
diff --git a/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap
index a3cac724b..edc5b7e41 100644
--- a/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/recheck/tmplibk/__snapshots__/jsfmt.spec.js.snap
@@ -26,7 +26,7 @@ type LibK = {
=====================================output=====================================
type LibK = {
- p: string
+ p: string,
};
================================================================================
diff --git a/tests/flow/record/__snapshots__/jsfmt.spec.js.snap b/tests/flow/record/__snapshots__/jsfmt.spec.js.snap
index 877bc5156..4b0c88072 100644
--- a/tests/flow/record/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/record/__snapshots__/jsfmt.spec.js.snap
@@ -35,7 +35,7 @@ var o3: {[key: AnyKey]: number} = { foo: 0 };
type Key1 = "foo" | "bar"; // make an enum type with known key set
var o1: { [key: Key1]: number } = {
foo: 0,
- bar: "" // error: string ~/~ number
+ bar: "", // error: string ~/~ number
};
o1.foo; // OK
o1.qux; // error: qux not found
diff --git a/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap b/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap
index ac23dce3b..27f4db557 100644
--- a/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap
@@ -135,7 +135,7 @@ var tests = [
function() {
var y: string = x || ""; // ok
- }
+ },
];
================================================================================
@@ -625,7 +625,7 @@ var tests = [
var { p } = x; // TODO: annot checked against type of x
(p: string); // ok
}
- }
+ },
];
================================================================================
@@ -890,7 +890,7 @@ var paths = [
x = "xxx";
}
var y: string = x;
- }
+ },
];
================================================================================
@@ -1158,7 +1158,7 @@ var null_tests = [
} else {
var y: string | void = x.p.q; // ok
}
- }
+ },
];
// this.p op null
@@ -1586,7 +1586,7 @@ var null_tests = [
} else {
var y: string = x.p.q; // ok
}
- }
+ },
];
// typeof this.p op typename
@@ -1754,7 +1754,7 @@ var undef_tests = [
} else {
var y: string = x.p.q; // ok
}
- }
+ },
];
// this.p op undefined
@@ -1912,7 +1912,7 @@ var void_tests = [
} else {
var y: string = x.p.q; // ok
}
- }
+ },
];
// this.p op void(...)
diff --git a/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap b/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap
index b6cd798bb..06caccde0 100644
--- a/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap
@@ -51,7 +51,7 @@ function foo(x: ?number) {
type Bar = {
parent: ?Bar,
- doStuff: () => void
+ doStuff: () => void,
};
function bar0(x: Bar) {
@@ -99,12 +99,12 @@ export type ASTNode = Node1 | Node2;
=====================================output=====================================
type Node1 = {
kind: "Node1",
- prop1?: string
+ prop1?: string,
};
type Node2 = {
kind: "Node2",
- prop2?: string
+ prop2?: string,
};
export type ASTNode = Node1 | Node2;
@@ -210,7 +210,7 @@ let tests = [
return x.result;
}
return x.result; // error
- }
+ },
];
================================================================================
@@ -246,7 +246,7 @@ function testLiteralProperty(a: A) {
// @flow
type A = {
- b_c: ?string
+ b_c: ?string,
};
function stuff(str: string) {}
@@ -374,7 +374,7 @@ let tests = [
(t.quux: string); // error, consider { foo: {}, bar: "" }
}
}
- }
+ },
];
================================================================================
@@ -457,7 +457,7 @@ let tests = [
} // error
if (x.y === 123) {
} // ok
- }
+ },
];
================================================================================
@@ -535,7 +535,7 @@ let tests = [
// incorrectly.
x.y.indexOf(z()); // no error
}
- }
+ },
];
================================================================================
@@ -927,7 +927,7 @@ function foo8(o: { p: mixed }) {
}
type Foo9Expected = {
- foo: string
+ foo: string,
};
function foo9() {
@@ -1319,7 +1319,7 @@ let tests = [
},
function(x: TestClass) {
(!x: false); // ok, classes are always truthy
- }
+ },
];
================================================================================
@@ -1605,7 +1605,7 @@ let tests = [
} else {
return x; // no error, inferred to be 0
}
- }
+ },
];
================================================================================
@@ -2234,7 +2234,7 @@ let tests = [
return x;
}
return "foo";
- }
+ },
];
================================================================================
@@ -2998,7 +2998,7 @@ let tests = [
(x.y: string);
x.z; // error
}
- }
+ },
];
================================================================================
@@ -3041,12 +3041,12 @@ import { SUCCESS, ERROR } from "./constants";
type Success = {
type: typeof SUCCESS,
- message: string
+ message: string,
};
type Error = {
type: typeof ERROR,
- error: string
+ error: string,
};
function handleStatus(status: Success | Error) {
diff --git a/tests/flow/require/__snapshots__/jsfmt.spec.js.snap b/tests/flow/require/__snapshots__/jsfmt.spec.js.snap
index 3be6802e9..b98f8a5ae 100644
--- a/tests/flow/require/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/require/__snapshots__/jsfmt.spec.js.snap
@@ -56,7 +56,7 @@ exports = {stringValue: ''};
// value will affect the exports object but re-binding it makes it useless and
// does not affect the exports value.
module.exports = {
- numberValue: 42
+ numberValue: 42,
};
exports = { stringValue: "" };
diff --git a/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap b/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap
index 96705e4fa..2230e7732 100644
--- a/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap
@@ -24,7 +24,7 @@ module.exports = {
module.exports = {
numberValueA: 1,
- stringValueA: "someString"
+ stringValueA: "someString",
};
================================================================================
@@ -54,7 +54,7 @@ module.exports = {
module.exports = {
numberValueB: 1,
- stringValueB: "someString"
+ stringValueB: "someString",
};
================================================================================
diff --git a/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap
index f4242ed8b..9648a309b 100644
--- a/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap
@@ -70,7 +70,7 @@ o.x = "...";
Foo.prototype = {
m: function() {
return false;
- }
+ },
};
var export_o: { x: any } = o; // awkward type cast
diff --git a/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap b/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap
index d07d080be..c13aa3d5a 100644
--- a/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap
@@ -47,7 +47,7 @@ var s6: string = o6.y; // ok (indexers make object types extensible)
var o7: { x: number, y?: string } = ({ x: 0, y: 0 }: {
x: number,
- [_: any]: number
+ [_: any]: number,
}); // error
================================================================================
diff --git a/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap b/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap
index 9d1450f42..42ea56de3 100644
--- a/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap
@@ -34,7 +34,7 @@ var y: $Shape = x;
=====================================output=====================================
type Foo = {
- field: number
+ field: number,
};
var x: { field?: number } = {};
diff --git a/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap b/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap
index c15c0ee3c..fc9fff176 100644
--- a/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap
@@ -52,14 +52,14 @@ function parseGroup(
counter: number,
begin: number,
end: number,
- text: string
+ text: string,
} {
var counter = parseCounter(lines[0]);
var timeframe = parseTimeframe(lines[1]);
return {
counter,
...timeframe,
- text: lines[2]
+ text: lines[2],
};
}
@@ -67,7 +67,7 @@ function parseTimeframe(line: string): { begin: number, end: number } {
var timestamps = line.split("-->");
return {
begin: parseTimestamp(timestamps[0].trim()),
- end: parseTimestamp(timestamps[1].trim())
+ end: parseTimestamp(timestamps[1].trim()),
};
}
@@ -134,7 +134,7 @@ var q = { z: "" };
var o = {
x: 5,
...p,
- ...q
+ ...q,
};
var y: number = o.y;
var z: number = o.z;
@@ -143,7 +143,7 @@ var z: number = o.z;
var r = { y: 123 };
var s = {
...p,
- ...r
+ ...r,
};
var t: boolean = s.y; // error, string or number
@@ -224,7 +224,7 @@ function test(
(value: string); // OK
return {
...x,
- kind: value
+ kind: value,
};
});
}
@@ -261,20 +261,20 @@ for (var i = 0; i < 10; i++) {
=====================================output=====================================
var o = {
- foo: "bar"
+ foo: "bar",
};
o = { ...o };
(o: { foo: string });
var p = {
- foo: "bar"
+ foo: "bar",
};
(p: { foo: string, abc: string }); // error, p doesn't have \`abc\` yet
p = { ...p, abc: "def" };
(p: { foo: string, abc: string });
var q = {
- foo: "bar"
+ foo: "bar",
};
for (var i = 0; i < 10; i++) {
q = { ...q };
@@ -306,7 +306,7 @@ let tests = [
function(x: Object) {
({ ...x }: Object);
({ ...x }: void); // error, Object
- }
+ },
];
================================================================================
diff --git a/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap b/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap
index a0b474021..1d2fe9855 100644
--- a/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap
@@ -49,7 +49,7 @@ module.exports = o;
/* @flow */
var o = {
A: require("./A"),
- ...require("./B")
+ ...require("./B"),
};
module.exports = o;
diff --git a/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap b/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap
index 69b5b7591..7950dc95b 100644
--- a/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap
@@ -121,11 +121,11 @@ x = y;
=====================================output=====================================
declare var x: {
- x: { foo: string }
+ x: { foo: string },
};
declare var y: {
// $FlowFixMe - this location is only mentioned in the extra section
- x: { bar: number }
+ x: { bar: number },
};
x = y;
diff --git a/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap b/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap
index d9303b1ee..95701fa43 100644
--- a/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap
@@ -128,7 +128,7 @@ declare type IData = IUserData | ISystemData;
const data: IData = {
id: "",
name: "",
- kind: "system"
+ kind: "system",
};
if (data.kind === "user") {
@@ -192,7 +192,7 @@ declare type IData = IUserData | ISystemData;
const data: IData = {
id: "",
name: "",
- kind: "system"
+ kind: "system",
};
if (data.kind === "system") {
@@ -244,19 +244,19 @@ if (data.kind === "user") {
type DataBase = {
id: string,
- name: string
+ name: string,
};
type UserData = {
id: string,
name: string,
- kind: "user"
+ kind: "user",
};
type SystemData = {
id: string,
name: string,
- kind: "system"
+ kind: "system",
};
declare type Data = UserData | SystemData;
@@ -264,7 +264,7 @@ declare type Data = UserData | SystemData;
const data: Data = {
id: "",
name: "",
- kind: "system"
+ kind: "system",
};
if (data.kind === "user") {
@@ -316,19 +316,19 @@ if (data.kind === "system") {
type DataBase = {
id: string,
- name: string
+ name: string,
};
type UserData = {
id: string,
name: string,
- kind: "user"
+ kind: "user",
};
type SystemData = {
id: string,
name: string,
- kind: "system"
+ kind: "system",
};
declare type Data = UserData | SystemData;
@@ -336,7 +336,7 @@ declare type Data = UserData | SystemData;
const data: Data = {
id: "",
name: "",
- kind: "system"
+ kind: "system",
};
if (data.kind === "system") {
diff --git a/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap b/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap
index 9bd03ee7e..ee69f4763 100644
--- a/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap
@@ -130,7 +130,7 @@ let tests = [
let foo = obj.foo;
foo(x); // error, taint ~> any
- }
+ },
];
================================================================================
@@ -280,7 +280,7 @@ let tests = [
function(x: any, y: $Tainted) {
let z = x();
z(y);
- }
+ },
];
================================================================================
diff --git a/tests/flow/template/__snapshots__/jsfmt.spec.js.snap b/tests/flow/template/__snapshots__/jsfmt.spec.js.snap
index ee2d1e39f..79942ad98 100644
--- a/tests/flow/template/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/template/__snapshots__/jsfmt.spec.js.snap
@@ -68,7 +68,7 @@ let tests = [
\`foo \${x}\`; // error
\`\${x} bar\`; // error
\`foo \${"bar"} \${x}\`; // error
- }
+ },
];
================================================================================
diff --git a/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap b/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap
index 61c4616c0..476d6973f 100644
--- a/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap
@@ -96,11 +96,11 @@ function f(b): React.Element<*> {
var React = require("react");
var A = React.createClass({
- propTypes: { foo: React.PropTypes.string.isRequired }
+ propTypes: { foo: React.PropTypes.string.isRequired },
});
var B = React.createClass({
- propTypes: { bar: React.PropTypes.string.isRequired }
+ propTypes: { bar: React.PropTypes.string.isRequired },
});
function f(b): React.Element<*> {
diff --git a/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap
index 2928112dd..4b0b820ec 100644
--- a/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap
@@ -44,7 +44,7 @@ export const X = {
test: function() {
let [a, b] = this.returnsATuple();
- }
+ },
};
================================================================================
@@ -88,23 +88,23 @@ const d = {
// }
const a = {
- bar(): void {}
+ bar(): void {},
};
const b = {
- bar: function(): void {}
+ bar: function(): void {},
};
const c = {
m(x: T): T {
return x;
- }
+ },
};
const d = {
m: function(x: T): T {
return x;
- }
+ },
};
================================================================================
@@ -220,7 +220,7 @@ let tests = [
function() {
let x = {};
Object.defineProperty(x, "foo", { value: "" });
- }
+ },
];
================================================================================
diff --git a/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap
index c58eb6ff0..1f80fa12a 100644
--- a/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap
@@ -5123,9 +5123,9 @@ export type Comment =
end: number,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
- start: number
+ start: number,
}
| {
type: "CommentBlock",
@@ -5134,9 +5134,9 @@ export type Comment =
end: number,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
- start: number
+ start: number,
};
export type Declaration =
@@ -5149,10 +5149,10 @@ export type Declaration =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ClassDeclaration",
@@ -5168,10 +5168,10 @@ export type Declaration =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "FunctionDeclaration",
@@ -5183,7 +5183,7 @@ export type Declaration =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
trailingComments: ?Array,
@@ -5194,7 +5194,7 @@ export type Declaration =
params: Array,
rest: ?Identifier,
returnType: ?TypeAnnotation,
- typeParameters: ?TypeParameterDeclaration
+ typeParameters: ?TypeParameterDeclaration,
}
| {
type: "MethodDefinition",
@@ -5210,10 +5210,10 @@ export type Declaration =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "VariableDeclaration",
@@ -5225,10 +5225,10 @@ export type Declaration =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ClassProperty",
@@ -5244,10 +5244,10 @@ export type Declaration =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
};
export type Expression =
@@ -5260,10 +5260,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "AssignmentExpression",
@@ -5276,10 +5276,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "AwaitExpression",
@@ -5291,10 +5291,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "BinaryExpression",
@@ -5307,10 +5307,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "BindExpression",
@@ -5322,10 +5322,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "CallExpression",
@@ -5337,10 +5337,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ClassExpression",
@@ -5356,10 +5356,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ComprehensionExpression",
@@ -5372,10 +5372,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ConditionalExpression",
@@ -5388,10 +5388,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "DoExpression",
@@ -5402,10 +5402,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "FunctionExpression",
@@ -5417,7 +5417,7 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
trailingComments: ?Array,
@@ -5428,7 +5428,7 @@ export type Expression =
params: Array,
rest: ?Identifier,
returnType: ?TypeAnnotation,
- typeParameters: ?TypeParameterDeclaration
+ typeParameters: ?TypeParameterDeclaration,
}
| {
type: "Identifier",
@@ -5440,10 +5440,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "Literal",
@@ -5456,10 +5456,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "LogicalExpression",
@@ -5472,10 +5472,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "MemberExpression",
@@ -5488,10 +5488,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "NewExpression",
@@ -5503,10 +5503,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ObjectExpression",
@@ -5517,10 +5517,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "SequenceExpression",
@@ -5531,10 +5531,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "TaggedTemplateExpression",
@@ -5546,10 +5546,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "TemplateLiteral",
@@ -5561,10 +5561,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ThisExpression",
@@ -5574,10 +5574,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "UnaryExpression",
@@ -5590,10 +5590,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "UpdateExpression",
@@ -5606,10 +5606,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "YieldExpression",
@@ -5621,10 +5621,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "TypeCastExpression",
@@ -5636,10 +5636,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "JSXElement",
@@ -5652,10 +5652,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "JSXEmptyExpression",
@@ -5665,10 +5665,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "JSXExpressionContainer",
@@ -5679,10 +5679,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "JSXMemberExpression",
@@ -5695,10 +5695,10 @@ export type Expression =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
};
export type Function =
@@ -5712,7 +5712,7 @@ export type Function =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
trailingComments: ?Array,
@@ -5723,7 +5723,7 @@ export type Function =
params: Array,
rest: ?Identifier,
returnType: ?TypeAnnotation,
- typeParameters: ?TypeParameterDeclaration
+ typeParameters: ?TypeParameterDeclaration,
}
| {
type: "FunctionDeclaration",
@@ -5735,7 +5735,7 @@ export type Function =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
trailingComments: ?Array,
@@ -5746,7 +5746,7 @@ export type Function =
params: Array,
rest: ?Identifier,
returnType: ?TypeAnnotation,
- typeParameters: ?TypeParameterDeclaration
+ typeParameters: ?TypeParameterDeclaration,
}
| {
type: "FunctionExpression",
@@ -5758,7 +5758,7 @@ export type Function =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
trailingComments: ?Array,
@@ -5769,7 +5769,7 @@ export type Function =
params: Array,
rest: ?Identifier,
returnType: ?TypeAnnotation,
- typeParameters: ?TypeParameterDeclaration
+ typeParameters: ?TypeParameterDeclaration,
};
export type Node =
@@ -5782,10 +5782,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ArrayPattern",
@@ -5797,10 +5797,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ArrowFunctionExpression",
@@ -5812,7 +5812,7 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
trailingComments: ?Array,
@@ -5823,7 +5823,7 @@ export type Node =
params: Array,
rest: ?Identifier,
returnType: ?TypeAnnotation,
- typeParameters: ?TypeParameterDeclaration
+ typeParameters: ?TypeParameterDeclaration,
}
| {
type: "AssignmentExpression",
@@ -5836,10 +5836,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "AssignmentPattern",
@@ -5851,10 +5851,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "AwaitExpression",
@@ -5866,10 +5866,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "BinaryExpression",
@@ -5882,10 +5882,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "BindExpression",
@@ -5897,10 +5897,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "BlockStatement",
@@ -5911,10 +5911,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "BreakStatement",
@@ -5925,10 +5925,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "CallExpression",
@@ -5940,10 +5940,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "CatchClause",
@@ -5955,10 +5955,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ClassBody",
@@ -5969,10 +5969,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array
+ trailingComments: ?Array,
}
| {
type: "ClassDeclaration",
@@ -5988,10 +5988,10 @@ export type Node =
leadingComments: ?Array,
loc: {
end: { column: number, line: number },
- start: { column: number, line: number }
+ start: { column: number, line: number },
},
start: number,
- trailingComments: ?Array