0.0.2 • Published 5 years ago

@elijahjcobb/optional v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Optional

Replicates Swift's Optional, hold a value or undefined, written in TypeScript.

Usage

import Optional from "@elijahjcobb/optional";

let optional: Optional<number> = new Optional<number>(1234);
if (optional.hasValue()) console.log(optional.getValue());
else console.log("NO VALUE");

TypeScript

All classes contain TypeScript declaration files. You can also view all the source code on GitHub.

Bugs

If you find any bugs please create an issue on GitHub or if you are old fashioned email me at elijah@elijahcobb.com.