Devs.tw 是讓工程師寫筆記、網誌的平台。歡迎您隨手紀錄、寫作,方便日後搜尋!
The type systems in Elm and TypeScript are operating in fundamentally different ways, built to serve their intended use cases.
Elm is a sandbox where nothing can enter with assumptions about its types. You have to prove everything to the Elm type system.
TypeScript is built in a way that's meant to be good at gradual typing, allowing you to add type information to existing JavaScript code in an incremental way.