Files
test-repo/tests/demo/2/__snapshots__/jsfmt.spec.js.snap
T

57 lines
989 B
Plaintext

exports[`test A.js 1`] = `
"/* @providesModule Demo */
class A {
x: number; // instance field declaration
constructor(x) { this.x = x; }
getX() { return this.x; }
onLoad(callback) {
return callback(this.getX());
}
}
function callback(x: string) { return x.length; }
var a = new A(42);
a.onLoad(callback);
module.exports = A;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @providesModule Demo */
// instance field declaration
class A {
x: number;
constructor(x) {
this.x = x;
}
getX() {
return this.x;
}
onLoad(callback) {
return callback(this.getX());
}
}
function callback(x: string) {
return x.length;
}
var a = new A(42);
a.onLoad(callback);
module.exports = A;
"
`;
exports[`test B.js 1`] = `
"var A = require(\'Demo\');
var z = new A(\"42\").getX();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var A = require(\"Demo\");
var z = new A(\"42\").getX();
"
`;