@binarymuse/ts-stdlib
v0.4.0
Published
A collection of useful utility types for TypeScript, including Option, Result, and more
Maintainers
Readme
ts-stdlib
@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
Installation
npm install @binarymuse/ts-stdlib
# or
pnpm add @binarymuse/ts-stdlib
# or
yarn add @binarymuse/ts-stdlibDocumentation
- Library docs
- Wrapper types:
- Container types:
