Skip to content

elijahjcobb/optional

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published