Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Inline assertions

Choose a tag to compare

@danvk danvk released this 21 Jan 21:15
· 27 commits to master since this release

These are helpful for testing the types of parameters in callbacks, e.g.

mapObject({a: 1, b: 2}, (
  val,  // $ExpectType number
  key,  // $ExpectType "a" | "b"
  c,  // $ExpectType { a: number; b: number; }
) => '' + val);