@cazoo/maybe
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@cazoo/maybe

What is this?

This provides some utility types that help represent uncertain outcomes. More specifically: it provides TypeScript implementations of result and option types.

The API for these types is very closely modelled around the Option and Result types in Rust. These Rust types are the inspiration for this library.

We also provide some helper types for dealing with options and results in asynchronous contexts. See AsyncOption and AsyncResult for more information.

Documentation

Documentation (including an API reference) is available via GitHub Pages (here).

Contributing

Contributions are very welcome! To contribute, first set up the repository. There are instructions for this below.

Open a branch and make whatever your changes. When you're ready, open a pull request for us to review!

When contributing, make sure that any additions are covered by unit tests. If you add or modify code, please ensure that you update the documentation to match your changes.

Also see our guide to contributing.

Readme

Keywords

none

Package Sidebar

Install

npm i @cazoo/maybe

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

136 kB

Total Files

25

Last publish

Collaborators

  • cazoo-gitlab