Skip to content

Commit 89e92bd

Browse files
committed
Update snapshots to demo makeTypeAnnotationBreakable()
1 parent 9fe6a8d commit 89e92bd

4 files changed

Lines changed: 41 additions & 44 deletions

File tree

tests/format/flow/assignments/__snapshots__/jsfmt.spec.js.snap

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> =
9898
const map: Map<Function, Foo<S>> = new Map();
9999
100100
=====================================output=====================================
101-
const map: Map<
102-
Function,
103-
Map<string | void, { value: UnloadedDescriptor }>
104-
> = new Map();
101+
const map: (
102+
Map<Function, Map<string | void, { value: UnloadedDescriptor }>>
103+
) = new Map();
105104
106105
const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> =
107106
new Map();

tests/format/flow/function-type-param/__snapshots__/jsfmt.spec.js.snap

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ export const testFunctionOnOptionsAsArgument: <T1,a>(?a, ((?a) => T1)) => T1 = f
1717
=====================================output=====================================
1818
let f: <A>(((?A) => B)) => B;
1919
20-
export const testFunctionOnOptionsAsArgument: <T1, a>(?a, ((?a) => T1)) => T1 =
21-
function _(Arg1, Arg2) {
22-
const result = TypesBS.testFunctionOnOptionsAsArgument(
23-
Arg1 == null ? undefined : Arg1,
24-
Arg2
25-
);
26-
return result;
27-
};
20+
export const testFunctionOnOptionsAsArgument: (
21+
<T1, a>(?a, ((?a) => T1)) => T1
22+
) = function _(Arg1, Arg2) {
23+
const result = TypesBS.testFunctionOnOptionsAsArgument(
24+
Arg1 == null ? undefined : Arg1,
25+
Arg2
26+
);
27+
return result;
28+
};
2829
2930
================================================================================
3031
`;

tests/format/typescript/assignment/__snapshots__/jsfmt.spec.js.snap

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,10 @@ interface MyComponent2Props {
333333
y: number;
334334
}
335335
336-
const MyComponent2: (
337-
React.VoidFunctionComponent<MyComponent2Props>
338-
) = ({ x, y }) => {
336+
const MyComponent2: React.VoidFunctionComponent<MyComponent2Props> = ({
337+
x,
338+
y,
339+
}) => {
339340
const a = useA();
340341
return (
341342
<div>
@@ -416,15 +417,13 @@ const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> =
416417
const map: Map<Function, Foo<S>> = new Map();
417418
418419
=====================================output=====================================
419-
const map: Map<
420-
Function,
421-
Map<string | void, { value: UnloadedDescriptor }>
422-
> = new Map();
423-
424-
const map: Map<
425-
Function,
426-
Condition extends Foo ? FooFooFoo : BarBarBar
427-
> = new Map();
420+
const map: (
421+
Map<Function, Map<string | void, { value: UnloadedDescriptor }>>
422+
) = new Map();
423+
424+
const map: (
425+
Map<Function, Condition extends Foo ? FooFooFoo : BarBarBar>
426+
) = new Map();
428427
429428
const map: Map<Function, FunctionFunctionFunctionFunctionffFunction> =
430429
new Map();

tests/format/typescript/intersection/__snapshots__/jsfmt.spec.js.snap

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,19 @@ export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedI
219219
// #6988
220220
221221
// functional component with ugly linebreak
222-
export const MyLongNamedReactFunctionalComponent1: FunctionComponent<
223-
ALongNamedInterface1 & ALongNamedInterface2
224-
> = (props) => {}
222+
export const MyLongNamedReactFunctionalComponent1: (
223+
FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2>
224+
) = (props) => {}
225225
226226
// functional component with valid linebreak
227-
export const MyLongNamedReactFunctionalComponent2: FunctionComponent<
228-
ALongNamedInterface1 | ALongNamedInterface2
229-
> = (props) => {}
227+
export const MyLongNamedReactFunctionalComponent2: (
228+
FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2>
229+
) = (props) => {}
230230
231231
// functional component with valid linebreak
232-
export const MyLongNamedReactFunctionalComponent3: FunctionComponent<
233-
ALongNamedInterface1,
234-
ALongNamedInterface2
235-
> = (props) => {}
232+
export const MyLongNamedReactFunctionalComponent3: (
233+
FunctionComponent<ALongNamedInterface1, ALongNamedInterface2>
234+
) = (props) => {}
236235
237236
================================================================================
238237
`;
@@ -258,20 +257,19 @@ export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedI
258257
// #6988
259258
260259
// functional component with ugly linebreak
261-
export const MyLongNamedReactFunctionalComponent1: FunctionComponent<
262-
ALongNamedInterface1 & ALongNamedInterface2
263-
> = (props) => {};
260+
export const MyLongNamedReactFunctionalComponent1: (
261+
FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2>
262+
) = (props) => {};
264263
265264
// functional component with valid linebreak
266-
export const MyLongNamedReactFunctionalComponent2: FunctionComponent<
267-
ALongNamedInterface1 | ALongNamedInterface2
268-
> = (props) => {};
265+
export const MyLongNamedReactFunctionalComponent2: (
266+
FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2>
267+
) = (props) => {};
269268
270269
// functional component with valid linebreak
271-
export const MyLongNamedReactFunctionalComponent3: FunctionComponent<
272-
ALongNamedInterface1,
273-
ALongNamedInterface2
274-
> = (props) => {};
270+
export const MyLongNamedReactFunctionalComponent3: (
271+
FunctionComponent<ALongNamedInterface1, ALongNamedInterface2>
272+
) = (props) => {};
275273
276274
================================================================================
277275
`;

0 commit comments

Comments
 (0)