remeda
Version:
A utility library for JavaScript and Typescript.
15 lines (12 loc) • 554 B
TypeScript
import { I as IfBoundedRecord } from './IfBoundedRecord-WIX9x_oz.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> = IfBoundedRecord<T, Partial<T>, T>;
export type { BoundedPartial as B };