1.2.0 • Published 3 years ago
@code-workers.io/ts-types v1.2.0
@code-workers.io/ts-types
A collection of TypeScript utitlty types to make your life easier.
Installation
npm i @code-workers.io/ts-typesUsage
import {KeyOf} from '@code-workers.io/ts-types';
type MyType = {
foo: string;
bar: number;
};
const property = KeyOf<MyType>; // 'foo'Available Types
KeyOf: get the keys of an type as string literalNullable: shorthand forT | nullOptional: shorthand forT | null | undefined
strict-types
A utility library for strict TypeScript applications.
In strict mode you commonly have union types for variables which usually consists of type | undefined |null,
where type is e.g. string.
This library is providing for each primitive data type a strict type:
StrictStringStrictNumberStrictBooleanStrictArrayStrictObject