@panyam/tsutils
Version:
Some basic TS utils for personal use
12 lines (11 loc) • 351 B
TypeScript
export type Timestamp = number;
export type NumberRange = [number, number];
export type StringMap<T> = {
[key: string]: T;
};
export type NumMap<T> = {
[key: number]: T;
};
export type Nullable<T> = T | null;
export type Undefined<T> = T | undefined | void;
export declare function assert(condition: boolean, msg?: string): asserts condition;