Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
__s
6y ago
0 comments
Share
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....
0 comments
default
newest
oldest
cyral
6y ago
This package has an index.d.ts file that utilizes exactly this.
j
/
k
navigate · click thread line to collapse