224 lines
5.1 KiB
Plaintext
224 lines
5.1 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`break.js 1`] = `
|
|
var X = {
|
|
perform: function<
|
|
A, B, C, D, E, F, G,
|
|
T: (a: A, b: B, c: C, d: D, e: E, f: F) => G // eslint-disable-line space-before-function-paren
|
|
>(
|
|
method: T, scope: any,
|
|
a: A, b: B, c: C, d: D, e: E, f: F,
|
|
): G {
|
|
}
|
|
}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
var X = {
|
|
perform: function<
|
|
A,
|
|
B,
|
|
C,
|
|
D,
|
|
E,
|
|
F,
|
|
G,
|
|
T: (a: A, b: B, c: C, d: D, e: E, f: F) => G // eslint-disable-line space-before-function-paren
|
|
>(method: T, scope: any, a: A, b: B, c: C, d: D, e: E, f: F): G {}
|
|
};
|
|
|
|
`;
|
|
|
|
exports[`break.js 2`] = `
|
|
var X = {
|
|
perform: function<
|
|
A, B, C, D, E, F, G,
|
|
T: (a: A, b: B, c: C, d: D, e: E, f: F) => G // eslint-disable-line space-before-function-paren
|
|
>(
|
|
method: T, scope: any,
|
|
a: A, b: B, c: C, d: D, e: E, f: F,
|
|
): G {
|
|
}
|
|
}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
var X = {
|
|
perform: function<
|
|
A,
|
|
B,
|
|
C,
|
|
D,
|
|
E,
|
|
F,
|
|
G,
|
|
T: (a: A, b: B, c: C, d: D, e: E, f: F) => G, // eslint-disable-line space-before-function-paren
|
|
>(method: T, scope: any, a: A, b: B, c: C, d: D, e: E, f: F): G {},
|
|
};
|
|
|
|
`;
|
|
|
|
exports[`generic.js 1`] = `
|
|
const identity = <T>(t: T): T => t;
|
|
const a = 1;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
const identity = <T>(t: T): T => t;
|
|
const a = 1;
|
|
|
|
`;
|
|
|
|
exports[`generic.js 2`] = `
|
|
const identity = <T>(t: T): T => t;
|
|
const a = 1;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
const identity = <T>(t: T): T => t;
|
|
const a = 1;
|
|
|
|
`;
|
|
|
|
exports[`interface.js 1`] = `
|
|
interface A { 'C': string; }
|
|
interface B { "D": boolean; }
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
interface A { C: string }
|
|
interface B { D: boolean }
|
|
|
|
`;
|
|
|
|
exports[`interface.js 2`] = `
|
|
interface A { 'C': string; }
|
|
interface B { "D": boolean; }
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
interface A { C: string }
|
|
interface B { D: boolean }
|
|
|
|
`;
|
|
|
|
exports[`nullable.js 1`] = `
|
|
function formatEntireFile(
|
|
fileVersion: FileVersion,
|
|
range: atom$Range,
|
|
): Promise<?{
|
|
newCursor?: number,
|
|
formatted: string,
|
|
}> {}
|
|
|
|
function foo(): Promise<?boolean> {}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
function formatEntireFile(
|
|
fileVersion: FileVersion,
|
|
range: atom$Range
|
|
): Promise<?{
|
|
newCursor?: number,
|
|
formatted: string
|
|
}> {}
|
|
|
|
function foo(): Promise<?boolean> {}
|
|
|
|
`;
|
|
|
|
exports[`nullable.js 2`] = `
|
|
function formatEntireFile(
|
|
fileVersion: FileVersion,
|
|
range: atom$Range,
|
|
): Promise<?{
|
|
newCursor?: number,
|
|
formatted: string,
|
|
}> {}
|
|
|
|
function foo(): Promise<?boolean> {}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
function formatEntireFile(
|
|
fileVersion: FileVersion,
|
|
range: atom$Range,
|
|
): Promise<?{
|
|
newCursor?: number,
|
|
formatted: string,
|
|
}> {}
|
|
|
|
function foo(): Promise<?boolean> {}
|
|
|
|
`;
|
|
|
|
exports[`trailing.js 1`] = `
|
|
type State = {
|
|
errors: Immutable.Map<
|
|
Ahohohhohohohohohohohohohohooh,
|
|
Fbt | Immutable.Map<ErrorIndex, Fbt>
|
|
>,
|
|
shouldValidate: boolean,
|
|
};
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
type State = {
|
|
errors: Immutable.Map<
|
|
Ahohohhohohohohohohohohohohooh,
|
|
Fbt | Immutable.Map<ErrorIndex, Fbt>
|
|
>,
|
|
shouldValidate: boolean
|
|
};
|
|
|
|
`;
|
|
|
|
exports[`trailing.js 2`] = `
|
|
type State = {
|
|
errors: Immutable.Map<
|
|
Ahohohhohohohohohohohohohohooh,
|
|
Fbt | Immutable.Map<ErrorIndex, Fbt>
|
|
>,
|
|
shouldValidate: boolean,
|
|
};
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
type State = {
|
|
errors: Immutable.Map<
|
|
Ahohohhohohohohohohohohohohooh,
|
|
Fbt | Immutable.Map<ErrorIndex, Fbt>,
|
|
>,
|
|
shouldValidate: boolean,
|
|
};
|
|
|
|
`;
|
|
|
|
exports[`type.js 1`] = `
|
|
type F = <T>(T) => T;
|
|
type G = (<A, B>(A) => B);
|
|
type H = { 'A': string, "B": number };
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
type F = <T>(T) => T;
|
|
type G = <A, B>(A) => B;
|
|
type H = { A: string, B: number };
|
|
|
|
`;
|
|
|
|
exports[`type.js 2`] = `
|
|
type F = <T>(T) => T;
|
|
type G = (<A, B>(A) => B);
|
|
type H = { 'A': string, "B": number };
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
type F = <T>(T) => T;
|
|
type G = <A, B>(A) => B;
|
|
type H = { A: string, B: number };
|
|
|
|
`;
|
|
|
|
exports[`union.js 1`] = `
|
|
type Foo = Promise<
|
|
{ ok: true, bar: string, baz: SomeOtherLongType } |
|
|
{ ok: false, bar: SomeOtherLongType }
|
|
>;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
type Foo = Promise<
|
|
| { ok: true, bar: string, baz: SomeOtherLongType }
|
|
| { ok: false, bar: SomeOtherLongType }
|
|
>;
|
|
|
|
`;
|
|
|
|
exports[`union.js 2`] = `
|
|
type Foo = Promise<
|
|
{ ok: true, bar: string, baz: SomeOtherLongType } |
|
|
{ ok: false, bar: SomeOtherLongType }
|
|
>;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
type Foo = Promise<
|
|
| { ok: true, bar: string, baz: SomeOtherLongType }
|
|
| { ok: false, bar: SomeOtherLongType },
|
|
>;
|
|
|
|
`;
|