Skip to content

1.1.0

Compare
Choose a tag to compare
@alexreardon alexreardon released this 30 Jan 03:45
· 70 commits to master since this release
  • 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`