46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`traces.js 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["flow"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
/*
|
|
* The location marked with the FlowFixMe does not show up in the original
|
|
* error but shows up in the flow check --traces 10 result. This test makes
|
|
* sure that we don't suppress the error due to a location that only shows up
|
|
* when --traces is turned on.
|
|
*/
|
|
|
|
// $FlowFixMe - Error unused suppression
|
|
function bar(): number { return 5; }
|
|
|
|
function foo(x: string) {
|
|
return bar();
|
|
}
|
|
|
|
var a: string = foo('hi'); // error number ~> string
|
|
|
|
=====================================output=====================================
|
|
/*
|
|
* The location marked with the FlowFixMe does not show up in the original
|
|
* error but shows up in the flow check --traces 10 result. This test makes
|
|
* sure that we don't suppress the error due to a location that only shows up
|
|
* when --traces is turned on.
|
|
*/
|
|
|
|
// $FlowFixMe - Error unused suppression
|
|
function bar(): number {
|
|
return 5;
|
|
}
|
|
|
|
function foo(x: string) {
|
|
return bar();
|
|
}
|
|
|
|
var a: string = foo("hi"); // error number ~> string
|
|
|
|
================================================================================
|
|
`;
|