niieani / typescript-vs-flowtype

Differences between Flowtype and TypeScript -- syntax and usability
MIT License
1.74k stars 78 forks source link

Fix Typescript nullable and index types #4

Closed sandersn closed 7 years ago

sandersn commented 7 years ago
  1. Typescript doesn't have special type syntax for nullable/optional types. Also it treats nullable (| null) and optional (| undefined) types separately.
  2. typeof isn't needed with index types -- they are types themselves.
niieani commented 7 years ago

Thanks!