prettier/tests/flow_type_declarations/__snapshots__/jsfmt.spec.js.snap

227 lines
8.8 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`declare_export.js 1`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
| printWidth
=====================================input======================================
declare export default 5;
=====================================output=====================================
declare export default 5;
================================================================================
`;
exports[`declare_export.js 2`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
declare export default 5;
=====================================output=====================================
declare export default 5
================================================================================
`;
exports[`declare_type.js 1`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
| printWidth
=====================================input======================================
declare type A = string;
=====================================output=====================================
declare type A = string;
================================================================================
`;
exports[`declare_type.js 2`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
declare type A = string;
=====================================output=====================================
declare type A = string
================================================================================
`;
exports[`declare_var.js 1`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
| printWidth
=====================================input======================================
declare var bool: React$PropType$Primitive<boolean>;
=====================================output=====================================
declare var bool: React$PropType$Primitive<boolean>;
================================================================================
`;
exports[`declare_var.js 2`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
declare var bool: React$PropType$Primitive<boolean>;
=====================================output=====================================
declare var bool: React$PropType$Primitive<boolean>
================================================================================
`;
exports[`long.js 1`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
| printWidth
=====================================input======================================
export type AdamPlacementValidationSingleErrorKey =
'SOME_FANCY_TARGETS.GLOBAL_TARGET';
export type SomeReallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = true;
export type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = null;
type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = SomeReallyLongLongLongLongLongLongIdentifier;
=====================================output=====================================
export type AdamPlacementValidationSingleErrorKey =
"SOME_FANCY_TARGETS.GLOBAL_TARGET";
export type SomeReallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = true;
export type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = null;
type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = SomeReallyLongLongLongLongLongLongIdentifier;
================================================================================
`;
exports[`long.js 2`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
export type AdamPlacementValidationSingleErrorKey =
'SOME_FANCY_TARGETS.GLOBAL_TARGET';
export type SomeReallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = true;
export type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = null;
type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = SomeReallyLongLongLongLongLongLongIdentifier;
=====================================output=====================================
export type AdamPlacementValidationSingleErrorKey =
"SOME_FANCY_TARGETS.GLOBAL_TARGET"
export type SomeReallyLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = true
export type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = null
type SomeOtherLongLongLongLongLongLongLongLongLongLongLongLongLongLongKey = SomeReallyLongLongLongLongLongLongIdentifier
================================================================================
`;
exports[`opaque.js 1`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
| printWidth
=====================================input======================================
declare export opaque type Foo;
declare export opaque type Bar<T>;
declare export opaque type Baz: Foo;
declare export opaque type Foo<T>: Bar<T>;
declare export opaque type Foo<T>: Bar;
declare export opaque type Foo: Bar<T>;
opaque type ID = string;
opaque type Foo<T> = Bar<T>;
opaque type Maybe<T> = _Maybe<T, *>;
export opaque type Foo = number;
opaque type union =
| {type: "A"}
| {type: "B"};
opaque type overloads =
& ((x: string) => number)
& ((x: number) => string);
=====================================output=====================================
declare export opaque type Foo;
declare export opaque type Bar<T>;
declare export opaque type Baz: Foo;
declare export opaque type Foo<T>: Bar<T>;
declare export opaque type Foo<T>: Bar;
declare export opaque type Foo: Bar<T>;
opaque type ID = string;
opaque type Foo<T> = Bar<T>;
opaque type Maybe<T> = _Maybe<T, *>;
export opaque type Foo = number;
opaque type union = { type: "A" } | { type: "B" };
opaque type overloads = ((x: string) => number) & ((x: number) => string);
================================================================================
`;
exports[`opaque.js 2`] = `
====================================options=====================================
parsers: ["flow", "babylon"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
declare export opaque type Foo;
declare export opaque type Bar<T>;
declare export opaque type Baz: Foo;
declare export opaque type Foo<T>: Bar<T>;
declare export opaque type Foo<T>: Bar;
declare export opaque type Foo: Bar<T>;
opaque type ID = string;
opaque type Foo<T> = Bar<T>;
opaque type Maybe<T> = _Maybe<T, *>;
export opaque type Foo = number;
opaque type union =
| {type: "A"}
| {type: "B"};
opaque type overloads =
& ((x: string) => number)
& ((x: number) => string);
=====================================output=====================================
declare export opaque type Foo
declare export opaque type Bar<T>
declare export opaque type Baz: Foo
declare export opaque type Foo<T>: Bar<T>
declare export opaque type Foo<T>: Bar
declare export opaque type Foo: Bar<T>
opaque type ID = string
opaque type Foo<T> = Bar<T>
opaque type Maybe<T> = _Maybe<T, *>
export opaque type Foo = number
opaque type union = { type: "A" } | { type: "B" }
opaque type overloads = ((x: string) => number) & ((x: number) => string)
================================================================================
`;