fluidstate-react
Version:
Library for using fine-grained reactivity state management library fluidstate in React
7 lines (6 loc) • 386 B
TypeScript
type Increment<A extends number[]> = [...A, 0];
type PrimitiveType = string | number | boolean | undefined | null | symbol | bigint;
export type DeepPartial<T, Depth extends number = 10, CurrentDepth extends number[] = []> = T extends PrimitiveType ? T : CurrentDepth["length"] extends Depth ? T : {
[K in keyof T]?: DeepPartial<T[K], Depth, Increment<CurrentDepth>>;
};
export {};