deep-get-set-ts
Version:
Deeply get and set values via dot-notation strings respecting type information.
12 lines (8 loc) • 455 B
text/typescript
/**
* Deeply get or set values using dot-notation strings with full type safety.
*/
declare function deep(...args: Parameters<typeof get> | Parameters<typeof set>): unknown;
export default deep;
export declare function get(obj: Record<string, unknown>, path: string | string[]): unknown;
export declare function set(obj: Record<string, unknown>, path: string | (string | string[])[], value: unknown, strict?: boolean): unknown;
export { }