1.1.0
- Now
TypeScript
native! (flow
usage still supported ❤️) - Leverages the new
TypeScript@3.7
asserts
keyword to correctly narrow types (caused a feature release)
const user: Person | null = getPerson();
invariant(user, 'expected user to be populated');
// the type of `user` is now narrowed to 'Person' rather than `Person | null`