News for hackers. Stuff that matters.
Re:A one-line package broke `npm create-react-app` by __s on Saturday April 25, 2020 @03:10PM (#22980504)
TypeScript supports 'function f(x: any): x is T' as a way to declare that if f returns true, x may pass as type T

https://www.typescriptlang.org/docs/handbook/advanced-types....

Re:A one-line package broke `npm create-react-app` by cyral on Saturday April 25, 2020 @10:15PM (#22983722)
This package has an index.d.ts file that utilizes exactly this.