Eric Elliott
Feb 25, 2017 · 1 min read

Types in TypeScript can be defined on separate lines. Simply use the type keyword. Since the types are not part of the JavaScript context, you can use the same name for the type and the identifier you’re associating with the type. That strategy makes TypeScript’s annotations a lot more readable, but you still have to put up with type constructor syntax, which compares quite poorly to Haskell’s polymorphic, higher-kinded types.

    Eric Elliott

    Written by

    Make some magic. #JavaScript