News for hackers. Stuff that matters.
Re:Announcing TypeScript 3.0 by jannes on Tuesday July 31, 2018 @08:05AM (#17652471)
You can still do something like this:

    let x: number = "some string" as any;
Re:Announcing TypeScript 3.0 by hath995 on Wednesday August 01, 2018 @02:48AM (#17660214)
That's sort of tautological. "Any" and type assertions are designed as the escape hatch of the type system. If you're trying to develop type safe typescript you obviously won't use those. The followup question is for typed code (excluding usage of any or type assertions) does typescript have an unsound type system? Afaik the answer is no.
Re:Announcing TypeScript 3.0 by jannes on Friday August 03, 2018 @04:32AM (#17678168)
In the real world you are forced to use "any" when the type definitions for a third-party library are not perfect.

This actually happens a lot with types from DefinitelyTyped that are not maintained by the original author of the library.

Re:Announcing TypeScript 3.0 by Too on Thursday August 02, 2018 @10:31AM (#17671669)
That would be the equivalent of static_cast in c++, or casting via (object) in C#. Both of those are considered type safe but can still be abused also.
Re:Announcing TypeScript 3.0 by mschuetz on Tuesday July 31, 2018 @04:30PM (#17656804)
I don't get it, I though the whole purpose of typescript is to prevent things like that?