1.0.5 • Published 12 months ago

@vladbasin/ts-types v1.0.5

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
12 months ago

ts-types

Useful types for better typescript coding

Install

npm install @vladbasin/ts-types --save

Getting Started

Wrap value into Maybe to explicitly identify it can be undefined

import { Maybe } from "@vladbasin/ts-types"

Maybe<T> maybeValue = getValueWhichMightBeUndefined();

Wrap value into Nullable to explicitly identify it can be null

import { Nullable } from "@vladbasin/ts-types"

Nullable<T> maybeValue = getValueWhichMightBeNull();

Wrap value into MaybeNullable to explicitly identify it can be null or also undefined

import { MaybeNullable } from "@vladbasin/ts-types"

MaybeNullable<T> maybeValue = getValueWhichMightBeNullOrUndefined();