2017-04-08 17:52:38 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`single.js 1`] = `
|
|
|
|
====================================options=====================================
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["flow", "babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-05-02 00:39:46 +03:00
|
|
|
const selectorByPath:
|
|
|
|
Path
|
|
|
|
=> SomethingSelector<
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingBulkValue<string>
|
|
|
|
> = memoizeWithArgs(/* ... */)
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-05-02 00:39:46 +03:00
|
|
|
const selectorByPath: Path => SomethingSelector<
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingBulkValue<string>
|
|
|
|
> = memoizeWithArgs(/* ... */);
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-05-02 00:39:46 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`single.js 2`] = `
|
|
|
|
====================================options=====================================
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["flow", "babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
trailingComma: "all"
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-05-02 00:39:46 +03:00
|
|
|
const selectorByPath:
|
|
|
|
Path
|
|
|
|
=> SomethingSelector<
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingBulkValue<string>
|
|
|
|
> = memoizeWithArgs(/* ... */)
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-05-02 00:39:46 +03:00
|
|
|
const selectorByPath: Path => SomethingSelector<
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingBulkValue<string>,
|
|
|
|
> = memoizeWithArgs(/* ... */);
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-05-02 00:39:46 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`single.js 3`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
arrowParens: "always"
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["flow", "babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-12-31 18:01:21 +03:00
|
|
|
const selectorByPath:
|
|
|
|
Path
|
|
|
|
=> SomethingSelector<
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingBulkValue<string>
|
|
|
|
> = memoizeWithArgs(/* ... */)
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-12-31 18:01:21 +03:00
|
|
|
const selectorByPath: (Path) => SomethingSelector<
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingUEditorContextType,
|
|
|
|
SomethingBulkValue<string>
|
|
|
|
> = memoizeWithArgs(/* ... */);
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-12-31 18:01:21 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`test.js 1`] = `
|
|
|
|
====================================options=====================================
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["flow", "babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-04-12 23:41:51 +03:00
|
|
|
type Banana = {
|
2017-04-08 17:52:38 +03:00
|
|
|
eat: string => boolean,
|
|
|
|
};
|
|
|
|
|
|
|
|
type Hex = {n: 0x01};
|
|
|
|
|
|
|
|
type T = { method: (a) => void };
|
|
|
|
|
|
|
|
type T = { method(a): void };
|
|
|
|
|
|
|
|
declare class X { method(a): void }
|
|
|
|
|
|
|
|
declare function f(a): void;
|
|
|
|
|
|
|
|
var f: (a) => void;
|
|
|
|
|
|
|
|
interface F { m(string): number }
|
|
|
|
|
|
|
|
interface F { m: (string) => number }
|
|
|
|
|
|
|
|
function f(o: { f: (string) => void }) {}
|
|
|
|
|
|
|
|
function f(o: { f(string): void }) {}
|
|
|
|
|
|
|
|
type f = (...arg) => void;
|
|
|
|
|
|
|
|
type f = (/* comment */ arg) => void;
|
|
|
|
|
|
|
|
type f = (arg /* comment */) => void;
|
|
|
|
|
|
|
|
type f = (?arg) => void;
|
2017-04-21 00:46:41 +03:00
|
|
|
|
|
|
|
class X {
|
|
|
|
constructor(
|
|
|
|
ideConnectionFactory: child_process$ChildProcess => FlowIDEConnection =
|
|
|
|
defaultIDEConnectionFactory,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface F {
|
|
|
|
ideConnectionFactoryLongLongLong: (child_process$ChildProcess) => FlowIDEConnection
|
|
|
|
}
|
2017-05-30 02:59:45 +03:00
|
|
|
|
|
|
|
type ExtractType = <A>(B<C>) => D
|
2018-05-14 17:25:16 +03:00
|
|
|
|
|
|
|
type T = ?(() => A);
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
type T = ?() => A | B;
|
|
|
|
|
|
|
|
type T = (?() => A) | B;
|
|
|
|
|
|
|
|
// https://github.com/babel/babel/issues/7924
|
|
|
|
//type T = ??() => A;
|
|
|
|
|
|
|
|
type T = ?(?(() => A));
|
|
|
|
|
|
|
|
type T = ?(?() => A) | B;
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-04-08 17:52:38 +03:00
|
|
|
type Banana = {
|
|
|
|
eat: string => boolean
|
|
|
|
};
|
|
|
|
|
|
|
|
type Hex = { n: 0x01 };
|
|
|
|
|
|
|
|
type T = { method: a => void };
|
|
|
|
|
|
|
|
type T = { method(a): void };
|
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
declare class X {
|
|
|
|
method(a): void;
|
|
|
|
}
|
2017-04-08 17:52:38 +03:00
|
|
|
|
|
|
|
declare function f(a): void;
|
|
|
|
|
|
|
|
var f: a => void;
|
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
interface F {
|
|
|
|
m(string): number;
|
|
|
|
}
|
2017-04-08 17:52:38 +03:00
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
interface F {
|
|
|
|
m: string => number;
|
|
|
|
}
|
2017-04-08 17:52:38 +03:00
|
|
|
|
|
|
|
function f(o: { f: string => void }) {}
|
|
|
|
|
|
|
|
function f(o: { f(string): void }) {}
|
|
|
|
|
|
|
|
type f = (...arg) => void;
|
|
|
|
|
|
|
|
type f = /* comment */ arg => void;
|
|
|
|
|
|
|
|
type f = arg /* comment */ => void;
|
|
|
|
|
2017-04-24 23:58:30 +03:00
|
|
|
type f = (?arg) => void;
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-04-21 00:46:41 +03:00
|
|
|
class X {
|
|
|
|
constructor(
|
2017-05-02 00:39:46 +03:00
|
|
|
ideConnectionFactory: child_process$ChildProcess => FlowIDEConnection = defaultIDEConnectionFactory
|
2017-04-21 00:46:41 +03:00
|
|
|
) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface F {
|
2017-09-25 14:45:40 +03:00
|
|
|
ideConnectionFactoryLongLongLong: child_process$ChildProcess => FlowIDEConnection;
|
2017-04-21 00:46:41 +03:00
|
|
|
}
|
|
|
|
|
2017-05-30 02:59:45 +03:00
|
|
|
type ExtractType = <A>(B<C>) => D;
|
|
|
|
|
2018-05-14 17:25:16 +03:00
|
|
|
type T = ?() => A;
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
type T = ?() => A | B;
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
// https://github.com/babel/babel/issues/7924
|
|
|
|
//type T = ??() => A;
|
|
|
|
|
|
|
|
type T = ??(() => A);
|
|
|
|
|
|
|
|
type T = ??(() => A) | B;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-04-21 00:46:41 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`test.js 2`] = `
|
|
|
|
====================================options=====================================
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["flow", "babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
trailingComma: "all"
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-04-21 00:46:41 +03:00
|
|
|
type Banana = {
|
|
|
|
eat: string => boolean,
|
|
|
|
};
|
|
|
|
|
|
|
|
type Hex = {n: 0x01};
|
|
|
|
|
|
|
|
type T = { method: (a) => void };
|
|
|
|
|
|
|
|
type T = { method(a): void };
|
|
|
|
|
|
|
|
declare class X { method(a): void }
|
|
|
|
|
|
|
|
declare function f(a): void;
|
|
|
|
|
|
|
|
var f: (a) => void;
|
|
|
|
|
|
|
|
interface F { m(string): number }
|
|
|
|
|
|
|
|
interface F { m: (string) => number }
|
|
|
|
|
|
|
|
function f(o: { f: (string) => void }) {}
|
|
|
|
|
|
|
|
function f(o: { f(string): void }) {}
|
|
|
|
|
|
|
|
type f = (...arg) => void;
|
|
|
|
|
|
|
|
type f = (/* comment */ arg) => void;
|
|
|
|
|
|
|
|
type f = (arg /* comment */) => void;
|
|
|
|
|
|
|
|
type f = (?arg) => void;
|
|
|
|
|
|
|
|
class X {
|
|
|
|
constructor(
|
|
|
|
ideConnectionFactory: child_process$ChildProcess => FlowIDEConnection =
|
|
|
|
defaultIDEConnectionFactory,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface F {
|
|
|
|
ideConnectionFactoryLongLongLong: (child_process$ChildProcess) => FlowIDEConnection
|
|
|
|
}
|
2017-05-30 02:59:45 +03:00
|
|
|
|
|
|
|
type ExtractType = <A>(B<C>) => D
|
2018-05-14 17:25:16 +03:00
|
|
|
|
|
|
|
type T = ?(() => A);
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
type T = ?() => A | B;
|
|
|
|
|
|
|
|
type T = (?() => A) | B;
|
|
|
|
|
|
|
|
// https://github.com/babel/babel/issues/7924
|
|
|
|
//type T = ??() => A;
|
|
|
|
|
|
|
|
type T = ?(?(() => A));
|
|
|
|
|
|
|
|
type T = ?(?() => A) | B;
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-04-21 00:46:41 +03:00
|
|
|
type Banana = {
|
|
|
|
eat: string => boolean,
|
|
|
|
};
|
|
|
|
|
|
|
|
type Hex = { n: 0x01 };
|
|
|
|
|
|
|
|
type T = { method: a => void };
|
|
|
|
|
|
|
|
type T = { method(a): void };
|
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
declare class X {
|
|
|
|
method(a): void;
|
|
|
|
}
|
2017-04-21 00:46:41 +03:00
|
|
|
|
|
|
|
declare function f(a): void;
|
|
|
|
|
|
|
|
var f: a => void;
|
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
interface F {
|
|
|
|
m(string): number;
|
|
|
|
}
|
2017-04-21 00:46:41 +03:00
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
interface F {
|
|
|
|
m: string => number;
|
|
|
|
}
|
2017-04-21 00:46:41 +03:00
|
|
|
|
|
|
|
function f(o: { f: string => void }) {}
|
|
|
|
|
|
|
|
function f(o: { f(string): void }) {}
|
|
|
|
|
|
|
|
type f = (...arg) => void;
|
|
|
|
|
|
|
|
type f = /* comment */ arg => void;
|
|
|
|
|
|
|
|
type f = arg /* comment */ => void;
|
|
|
|
|
2017-04-25 19:48:56 +03:00
|
|
|
type f = (?arg) => void;
|
2017-04-21 00:46:41 +03:00
|
|
|
|
|
|
|
class X {
|
|
|
|
constructor(
|
2017-05-02 00:39:46 +03:00
|
|
|
ideConnectionFactory: child_process$ChildProcess => FlowIDEConnection = defaultIDEConnectionFactory,
|
2017-04-21 00:46:41 +03:00
|
|
|
) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface F {
|
2017-09-25 14:45:40 +03:00
|
|
|
ideConnectionFactoryLongLongLong: child_process$ChildProcess => FlowIDEConnection;
|
2017-04-21 00:46:41 +03:00
|
|
|
}
|
|
|
|
|
2017-05-30 02:59:45 +03:00
|
|
|
type ExtractType = <A>(B<C>) => D;
|
|
|
|
|
2018-05-14 17:25:16 +03:00
|
|
|
type T = ?() => A;
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
type T = ?() => A | B;
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
// https://github.com/babel/babel/issues/7924
|
|
|
|
//type T = ??() => A;
|
|
|
|
|
|
|
|
type T = ??(() => A);
|
|
|
|
|
|
|
|
type T = ??(() => A) | B;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-04-08 17:52:38 +03:00
|
|
|
`;
|
2017-12-31 18:01:21 +03:00
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`test.js 3`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
arrowParens: "always"
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["flow", "babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-12-31 18:01:21 +03:00
|
|
|
type Banana = {
|
|
|
|
eat: string => boolean,
|
|
|
|
};
|
|
|
|
|
|
|
|
type Hex = {n: 0x01};
|
|
|
|
|
|
|
|
type T = { method: (a) => void };
|
|
|
|
|
|
|
|
type T = { method(a): void };
|
|
|
|
|
|
|
|
declare class X { method(a): void }
|
|
|
|
|
|
|
|
declare function f(a): void;
|
|
|
|
|
|
|
|
var f: (a) => void;
|
|
|
|
|
|
|
|
interface F { m(string): number }
|
|
|
|
|
|
|
|
interface F { m: (string) => number }
|
|
|
|
|
|
|
|
function f(o: { f: (string) => void }) {}
|
|
|
|
|
|
|
|
function f(o: { f(string): void }) {}
|
|
|
|
|
|
|
|
type f = (...arg) => void;
|
|
|
|
|
|
|
|
type f = (/* comment */ arg) => void;
|
|
|
|
|
|
|
|
type f = (arg /* comment */) => void;
|
|
|
|
|
|
|
|
type f = (?arg) => void;
|
|
|
|
|
|
|
|
class X {
|
|
|
|
constructor(
|
|
|
|
ideConnectionFactory: child_process$ChildProcess => FlowIDEConnection =
|
|
|
|
defaultIDEConnectionFactory,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface F {
|
|
|
|
ideConnectionFactoryLongLongLong: (child_process$ChildProcess) => FlowIDEConnection
|
|
|
|
}
|
|
|
|
|
|
|
|
type ExtractType = <A>(B<C>) => D
|
2018-05-14 17:25:16 +03:00
|
|
|
|
|
|
|
type T = ?(() => A);
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
type T = ?() => A | B;
|
|
|
|
|
|
|
|
type T = (?() => A) | B;
|
|
|
|
|
|
|
|
// https://github.com/babel/babel/issues/7924
|
|
|
|
//type T = ??() => A;
|
|
|
|
|
|
|
|
type T = ?(?(() => A));
|
|
|
|
|
|
|
|
type T = ?(?() => A) | B;
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-12-31 18:01:21 +03:00
|
|
|
type Banana = {
|
|
|
|
eat: (string) => boolean
|
|
|
|
};
|
|
|
|
|
|
|
|
type Hex = { n: 0x01 };
|
|
|
|
|
|
|
|
type T = { method: (a) => void };
|
|
|
|
|
|
|
|
type T = { method(a): void };
|
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
declare class X {
|
|
|
|
method(a): void;
|
|
|
|
}
|
2017-12-31 18:01:21 +03:00
|
|
|
|
|
|
|
declare function f(a): void;
|
|
|
|
|
|
|
|
var f: (a) => void;
|
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
interface F {
|
|
|
|
m(string): number;
|
|
|
|
}
|
2017-12-31 18:01:21 +03:00
|
|
|
|
2018-11-10 19:15:18 +03:00
|
|
|
interface F {
|
|
|
|
m: (string) => number;
|
|
|
|
}
|
2017-12-31 18:01:21 +03:00
|
|
|
|
|
|
|
function f(o: { f: (string) => void }) {}
|
|
|
|
|
|
|
|
function f(o: { f(string): void }) {}
|
|
|
|
|
|
|
|
type f = (...arg) => void;
|
|
|
|
|
|
|
|
type f = (/* comment */ arg) => void;
|
|
|
|
|
|
|
|
type f = (arg /* comment */) => void;
|
|
|
|
|
|
|
|
type f = (?arg) => void;
|
|
|
|
|
|
|
|
class X {
|
|
|
|
constructor(
|
|
|
|
ideConnectionFactory: (child_process$ChildProcess) => FlowIDEConnection = defaultIDEConnectionFactory
|
|
|
|
) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface F {
|
|
|
|
ideConnectionFactoryLongLongLong: (child_process$ChildProcess) => FlowIDEConnection;
|
|
|
|
}
|
|
|
|
|
|
|
|
type ExtractType = <A>(B<C>) => D;
|
|
|
|
|
2018-05-14 17:25:16 +03:00
|
|
|
type T = ?() => A;
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
type T = ?() => A | B;
|
|
|
|
|
|
|
|
type T = ?(() => A) | B;
|
|
|
|
|
|
|
|
// https://github.com/babel/babel/issues/7924
|
|
|
|
//type T = ??() => A;
|
|
|
|
|
|
|
|
type T = ??(() => A);
|
|
|
|
|
|
|
|
type T = ??(() => A) | B;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2017-12-31 18:01:21 +03:00
|
|
|
`;
|