Types
v1.0.0Shared utility types exported by ts-utils.
Dictionary
import type { Dictionary } from '@oardi/ts-utils';
const labels: Dictionary<string> = {
save: 'Save',
cancel: 'Cancel',
};
Dictionary<T> is an alias for Record<string, T>.
Size
import type { Size } from '@oardi/ts-utils';
const breakpoint: Size = 'lg';
Available values are xs, sm, md, lg, xl, xxl, and xxxl.
Nullable and Optional
The package also exports two nullish convenience types:
import type { Nullable, Optional } from '@oardi/ts-utils';
const selectedId: Nullable<number> = null;
const label: Optional<string> = undefined;
Previous:Interfaces
← KeyValue Interface