News for hackers. Stuff that matters.
Re:Show HN: Ezno, a type checker for JavaScript and optimise... by graftak on Saturday September 24, 2022 @03:34AM (#32960464)
About 90% of any can and should be replaced with unknown which is infinitely more useful and a lot safer.

There is an example signature at the end of the article; (x: any) => string, this error would not fly if x were unknown.

On of the few remaining scenarios where any might be necessary is to narrow down a generic param, ie <T extends Something<any>>.

There are no comments on this comment yet.