Skip to content

Instantly share code, notes, and snippets.

@kasperpeulen
Last active November 20, 2020 11:41
Show Gist options
  • Save kasperpeulen/b966178b32d240a70867ed11e7a28b2e to your computer and use it in GitHub Desktop.
Save kasperpeulen/b966178b32d240a70867ed11e7a28b2e to your computer and use it in GitHub Desktop.
const promise: Promise<A>;
const a = await promise;
// a of type A
const monad: Monad<B>;
const b = yield monad;
// b is of type B, but not automatically inferred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment