prettier/tests/flow/call_caching1/__snapshots__/jsfmt.spec.js.snap

102 lines
2.0 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`test.js 1`] = `
// @flow
const Immutable = require('immutable');
const tasksPerStatusMap = new Map(
[].map(taskStatus => [taskStatus, new Map()]),
);
for (let [taskStatus, tasksMap] of tasksPerStatusMap) {
tasksPerStatusMap.set(taskStatus, Immutable.Map(tasksMap));
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// @flow
const Immutable = require("immutable");
const tasksPerStatusMap = new Map(
[].map(taskStatus => [taskStatus, new Map()])
);
for (let [taskStatus, tasksMap] of tasksPerStatusMap) {
tasksPerStatusMap.set(taskStatus, Immutable.Map(tasksMap));
}
`;
exports[`test2.js 1`] = `
/* @flow */
declare class Bar<K> {
update<K_>(updater: (value: this) => Bar<K_>): Bar<K_>;
}
declare function foo<U>(
initialValue: U,
callbackfn: (previousValue: U) => U
): U;
declare var items: Bar<string>;
declare var updater: (value: Bar<string>) => Bar<string>;
foo(
items,
(acc) => acc.update(updater)
);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @flow */
declare class Bar<K> {
update<K_>(updater: (value: this) => Bar<K_>): Bar<K_>
}
declare function foo<U>(
initialValue: U,
callbackfn: (previousValue: U) => U
): U;
declare var items: Bar<string>;
declare var updater: (value: Bar<string>) => Bar<string>;
foo(items, acc => acc.update(updater));
`;
exports[`test3.js 1`] = `
// @flow
declare class ImmBox<T> {
static <U>(x: any): ImmBox<U>;
static (x: any): any;
}
declare class Box<T> {
constructor(x: T): void;
set(value: T): void;
get(): T;
}
const outer = new Box();
const inner = outer.get();
outer.set(ImmBox(inner));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// @flow
declare class ImmBox<T> {
static <U>(x: any): ImmBox<U>,
static (x: any): any
}
declare class Box<T> {
constructor(x: T): void,
set(value: T): void,
get(): T
}
const outer = new Box();
const inner = outer.get();
outer.set(ImmBox(inner));
`;