@binarymuse/ts-stdlib
is a set of classes, utilities, and types to make working with TypeScript a little bit nicer. These concepts can be found in many different languages, although many of the implementations here are inspired by Rust.
The library includes:
Wrapper Types:
-
Option<T>
- a type that represents a value (Some<T>
) or the absence of one (None
) -
Result<T, E>
- a type that represents a successful result (Ok<T>
) or an error (Err<E>
) -
Rc<T>
- a reference counted resource
Container Types:
-
Deque<T>
- a double-ended queue, implemented with a doubly-linked list
npm install @binarymuse/ts-stdlib
# or
pnpm add @binarymuse/ts-stdlib
# or
yarn add @binarymuse/ts-stdlib
- Library docs
- Wrapper types:
- Container types: