@vladbasin/ts-types
v1.0.5
Published
Various types for better typescripting
Downloads
364
Maintainers
Readme
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();