UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

15 lines (12 loc) 569 B
import { I as IsBoundedRecord } from './IsBoundedRecord-CeHuKZ6O.js'; /** * Records with an unbounded set of keys have different semantics to those with * a bounded set of keys when using 'noUncheckedIndexedAccess', the former * being implicitly `Partial` whereas the latter are implicitly `Required`. * * @example * BoundedPartial<{ a: number }>; //=> { a?: number } * BoundedPartial<Record<string, number>>; //=> Record<string, number> */ type BoundedPartial<T> = IsBoundedRecord<T> extends true ? Partial<T> : T; export type { BoundedPartial as B };