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

102 lines
2.3 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`A.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
| printWidth
=====================================input======================================
// @flow
class A<T> {
x: T
}
module.exports = A;
=====================================output=====================================
// @flow
class A<T> {
x: T;
}
module.exports = A;
================================================================================
`;
exports[`B.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
| printWidth
=====================================input======================================
// @flow
let A = require('./A');
class B extends A<string> {
constructor() {
super();
}
}
module.exports = new B();
=====================================output=====================================
// @flow
let A = require("./A");
class B extends A<string> {
constructor() {
super();
}
}
module.exports = new B();
================================================================================
`;
exports[`C.js 1`] = `
====================================options=====================================
parsers: ["flow"]
printWidth: 80
| printWidth
=====================================input======================================
// @flow
// This test exports a function whose return type is the class's \`this\` type.
// It should be inferred (no annotation required).
class Foo {
foo(): this {
return this;
}
}
export function f(x: Foo) {
return x.foo();
}
=====================================output=====================================
// @flow
// This test exports a function whose return type is the class's \`this\` type.
// It should be inferred (no annotation required).
class Foo {
foo(): this {
return this;
}
}
export function f(x: Foo) {
return x.foo();
}
================================================================================
`;