-
Notifications
You must be signed in to change notification settings - Fork 6
/
typechecker-test.js.snap
35 lines (25 loc) · 1.11 KB
/
typechecker-test.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`nullthrows with flow 1`] = `""`;
exports[`nullthrows with flow 2`] = `
"Error --------------------------------------------------------------- __tests__/__fixtures__/flow-package/index.js:11:20
Cannot assign \`obj\` to \`bad1\` because null or undefined [1] is incompatible with object type [2].
__tests__/__fixtures__/flow-package/index.js:11:20
11| var bad1: Object = obj;
^^^
References:
__tests__/__fixtures__/flow-package/index.js:5:16
5| var obj = ({}: ?Object);
^^^^^^^ [1]
__tests__/__fixtures__/flow-package/index.js:11:11
11| var bad1: Object = obj;
^^^^^^ [2]
Found 1 error
"
`;
exports[`nullthrows with typescript 1`] = `""`;
exports[`nullthrows with typescript 2`] = `
"__tests__/__fixtures__/typescript-package/index.ts(10,5): error TS2322: Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
__tests__/__fixtures__/typescript-package/index.ts(12,5): error TS2322: Type 'string' is not assignable to type 'number'.
"
`;