Inline assertions
These are helpful for testing the types of parameters in callbacks, e.g.
mapObject({a: 1, b: 2}, (
val, // $ExpectType number
key, // $ExpectType "a" | "b"
c, // $ExpectType { a: number; b: number; }
) => '' + val);
These are helpful for testing the types of parameters in callbacks, e.g.
mapObject({a: 1, b: 2}, (
val, // $ExpectType number
key, // $ExpectType "a" | "b"
c, // $ExpectType { a: number; b: number; }
) => '' + val);