Hacker News new | ask | show | jobs
by jiaweihli 3354 days ago
No, (Foo | undefined)[] means an array of elements that are either of type Foo or are undefined.

Foo[] | undefined[] means either 1) an array of Foo, or 2) an array of undefined.

1 comments

Ahh got it - thanks!