Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/careful/src/containers/mod.ts

Safe containerization of values for TypeScript
Latest
import * as careful from "https://deno.land/x/careful@v0.1.0/src/containers/mod.ts";

Classes

Container is a base class for all entities that have a value and a trackId.

The IO class represents a lazy computation that may produce a value of type A. It is essentially a wrapper around a function of type () => A, which is called the "effect".

The Left class represents the left side of Either class which by convention is a "failure".

None is a type that represents no value. It is similar to the Nothing type in Haskell.

OptionAbstract is a type that represents either a value or no value. It is similar to the Maybe type in Haskell.

The Right class represents the right side of Either class which by convention is a "success".

Some is a type that represents a value. It is similar to the Just type in Haskell.

Variables

None - Creates a new None instance.

Some - Creates a new Some instance.

Type Aliases

The Either class represents a value of one of two possible types (a disjoint union). An Either is either a Left or a Right.

Option is a type that represents either a value or no value. It is similar to the Maybe type in Haskell.