any
typeany
vs. Elm's Debug.todo
TypeScript's any
essentially "turns off" type checking in areas that any passes through.
In Elm:
Debug.todo
, but you can't build your app with --optimize
if it has Debug.todo's in itThis Ellie example (with compiler error as expected) and this TypeScript playground example (with no error) show the difference.
any
can not be used in places that take never
any
vs unknown
JSON.parse
returns any
, as do many core and published typingsio-ts
lets you validate JSON similar to JSON decoders in ElmnoImplicitAny
+
object, '' + {} === '[object Object]'
)any
regardless of implementation if they aren't given an explicit typenumber
values instead of literal typeselm-ts-interop