Files
test-repo/tests/flow_function_parentheses/test.js
T
fisker Cheung 179943ccba Update @babel/parser to v7.6.3 (#6386)
* fix flow_function_parentheses

* fix directives

* fix classes

* fix flow_method

* fix `do`

* fix `decorators`

* fix `comments_closure_typecast`

* fix `comments`

* fix `flow_internal_slot`

* fix `flow_comments`

* fix `flow_type_declarations`

* fix `flow_type_spread`

* fix `functional_composition`

* fix `multiparser_js_css`

* fix `no-semi`

* fix `objects`

* fix `template`

* fix `yield`

* update `flow_method` snap

* fix `empty_paren_comment`

* fix `mdx`

* fix `object_property_comment`

* Update `@babel/parser`

* Update @babel/parser to v7.6.2

* Update yarn.lock

* fix `nullish_coalescing` test

* fix `flow_class_field` test

* fix snapshot

* @babel/parser v7.6.3

* fix tests

* update snap
2019-10-09 14:52:11 +03:00

61 lines
1.0 KiB
JavaScript

type Banana = {
eat: string => boolean,
};
type Hex = {n: 0x01};
type T1 = { method: (a) => void };
type T2 = { method(a): void };
declare class X { method(a): void }
declare function f(a): void;
var f: (a) => void;
interface F1 { m(string): number }
interface F2 { m: (string) => number }
function f1(o: { f: (string) => void }) {}
function f2(o: { f(string): void }) {}
type f3 = (...arg) => void;
type f4 = (/* comment */ arg) => void;
type f5 = (arg /* comment */) => void;
type f6 = (?arg) => void;
class Y {
constructor(
ideConnectionFactory: child_process$ChildProcess => FlowIDEConnection =
defaultIDEConnectionFactory,
) {
}
}
interface F {
ideConnectionFactoryLongLongLong: (child_process$ChildProcess) => FlowIDEConnection
}
type ExtractType = <A>(B<C>) => D
type T3 = ?(() => A);
type T4 = ?(() => A) | B;
type T5 = ?() => A | B;
type T6 = (?() => A) | B;
// https://github.com/babel/babel/issues/7924
//type T = ??() => A;
type T7 = ?(?(() => A));
type T8 = ?(?() => A) | B;