If you want absolute certainty in your types with TS, you should be using the `--strict` flag, which makes it so this is not the case.
For example (included with --strict):
https://www.typescriptlang.org/play/#src=class%20Base%20%7B%...
(I like TS, I just don't think it fully solves this problem!)
You're right -- but I've found in practice that strict null checking[0] is more than enough. Also I assume that Purescript has a similar bottom value as haskell[1] (please correct me if I'm wrong).
> I think you mean the ability to add explicit types to variable names. It always had types.
Yep -- I actually meant literally the `typing` module[2].
> Certainly.. iff you use dependent types.
You can get some good guarantees with container types (`newtype` in haskell terminology) that are constructed in a very specific way, assuming you have immutable values. For example, defining some type `NonZero<Int>` in typescript w/ `private readonly` interior value.
> Why specify types if they can be inferred? Why do work that our computers can do for us?
You're right -- I misspoke (misstyped?). By all means if inference is possible that is also fine.
Somewhat seperately, the statement stands as far as type signatures (i.e. `doThing :: Input -> Output` or `function doThing(in: Input): Output`) go -- they're great benefits to a codebase in my opinion.
[0]: https://basarat.gitbooks.io/typescript/docs/options/strictNu...
This isn't true as far the way you stated it. TypeScript types are not nullable by default.
How can you use existing JS libraries without supporting null anyway?
null/undefined is an inhabitant of every type in typescript, I would suggest purescript instead.
> Python relatively recently added typing
I think you mean the ability to add explicit types to variable names. It always had types.
> "extensive" unit testing is a poor man's type checker
Certainly.. iff you use dependent types.
> developers that don't think specifying types is helpful
Why specify types if they can be inferred? Why do work that our computers can do for us?