Skip to content

BinaryMuse/ts-stdlib

Repository files navigation

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-stdlib

Documentation

About

A collection of useful utility types for TypeScript, including Option, Result, and more

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors