| 1 | declare function foo(x: mixed): boolean %checks(x !== null); |
| 2 | |
| 3 | declare function my_filter<T, P: $Pred<1>>(v: Array<T>, cb: P): Array<$Refine<T,P,1>>; |
| 4 | |
| 5 | declare function f2(x: mixed): string %checks(Array.isArray(x)); |
| 6 | |
| 7 | function foo(x: mixed): %checks { return typeof x === "string"; } |
| 8 | |
| 9 | function is_string(x): boolean %checks { |
| 10 | return typeof x === "string"; |
| 11 | } |
| 12 | |
| 13 | var f = (x: mixed): %checks => typeof x === "string"; |
| 14 | |
| 15 | const foo2 = (x: mixed): boolean %checks => typeof x === "string"; |
| 16 | |
| 17 | (x): %checks => x !== null; |