Slide 25
Slide 25 text
$ flow
Error
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
┈┈┈┈┈┈┈┈┈┈ src/index.ts:6:6
Cannot call hoge with undefined bound to hoge because:
• Either property x is missing in undefined [1] but exists in
Hoge [2].
• Or undefined [1] is incompatible with null [3].
src/index.ts
3│
4│ hoge({x: 1, y: 2})
5│ hoge({x: 1, y: 2, z: 3})
[1] 6│ hoge(undefined)
7│
src/Hoge.ts
[2][3] 7│ export const hoge = (hoge: Hoge | null): Hoge =>
{