Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because what you wrote broadens the type. `satisfies` validates the type without broadening it.

const c: string = 'c';

This will be of type string instead of type 'c'. This is a barebones example and it already breaks support for template literal types. Imagine how much better `satisfies` is for complex union types.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: