Skip to content

0.2.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@kennethnym kennethnym released this 01 May 16:19
· 10 commits to main since this release

You can now return an empty ok or err:

function someWork(): Result<void, void> {
  // ... stuff

  if (someError) {
    return err()
  }

  // ... more stuff

  return ok()
}

trys and tryp will now also infer the void type correctly if the given function and promise returns void