I find it weird to put `{}` together. So I figured I would change it to have an empty line and ask for feedback :)

Beware: most of the test cases are not representative of real code, you almost never define blocks with no content in practice.
57 lines
967 B
Plaintext
57 lines
967 B
Plaintext
exports[`test cli.js 1`] = `
|
|
"/* @flow */
|
|
|
|
var f = require(\'./lib\');
|
|
|
|
var y:number = f(0);
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
/* @flow */
|
|
|
|
var f = require(\"./lib\");
|
|
|
|
var y: number = f(0);
|
|
"
|
|
`;
|
|
|
|
exports[`test cli2.js 1`] = `
|
|
"/* @flow */
|
|
|
|
var f = require(\'./lib\');
|
|
|
|
f(\"...\");
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
/* @flow */
|
|
|
|
var f = require(\"./lib\");
|
|
|
|
f(\"...\");
|
|
"
|
|
`;
|
|
|
|
exports[`test lib.js 1`] = `
|
|
"/* @flow */
|
|
|
|
function g(x:string) { }
|
|
|
|
//function f(x) { g(x); return x; }
|
|
//function f(x:number) { g(x); return x; }
|
|
function f(x:number):number { g(x); return x; }
|
|
|
|
module.exports = f;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
/* @flow */
|
|
|
|
function g(x: string) {
|
|
}
|
|
|
|
//function f(x) { g(x); return x; }
|
|
//function f(x:number) { g(x); return x; }
|
|
function f(x: number): number {
|
|
g(x);
|
|
return x;
|
|
}
|
|
|
|
module.exports = f;
|
|
"
|
|
`;
|