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

102 lines
2.3 KiB
Plaintext
Raw Normal View History

// 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=====================================
2016-12-27 21:29:31 +03:00
// @flow
2016-12-27 21:29:31 +03:00
class A<T> {
x: T;
}
2017-01-11 18:16:38 +03:00
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=====================================
2016-12-27 21:29:31 +03:00
// @flow
let A = require("./A");
2016-12-27 21:29:31 +03:00
class B extends A<string> {
constructor() {
super();
}
}
2017-01-11 18:16:38 +03:00
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();
2017-01-11 18:16:38 +03:00
}
================================================================================
`;