utilium 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/objects.d.ts +1 -0
- package/package.json +1 -1
package/dist/objects.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export interface ConstMap<T extends Partial<Record<keyof any, any>>, K extends k
|
|
|
47
47
|
}
|
|
48
48
|
export declare function map<const T extends Partial<Record<any, any>>>(items: T): Map<keyof T, T[keyof T]>;
|
|
49
49
|
export declare function getByString<T>(object: Record<string, any>, path: string, separator?: RegExp): T;
|
|
50
|
+
export type GetByString<Data, Path extends string> = Path extends `__proto__${`${'.' | '[' | ']' | "'" | '"'}${string}` | ''}` ? never : Path extends `${infer Key extends keyof Data & (string | number)}${'.' | '[' | ']' | "'" | '"'}${infer Rest}` ? Key extends '' ? GetByString<Data, Rest> : GetByString<Data[Key], Rest> : Path extends keyof Data & (string | number) ? Data[Path] : undefined;
|
|
50
51
|
export declare function setByString<T>(object: Record<string, any>, path: string, value: unknown, separator?: RegExp): T;
|
|
51
52
|
export type JSONPrimitive = null | string | number | boolean;
|
|
52
53
|
export interface JSONObject {
|