topkat-utils 1.2.58 → 1.2.59
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.
|
@@ -104,7 +104,7 @@ export declare function unflattenObject(data: Record<string, any>): Record<strin
|
|
|
104
104
|
export declare function objEntries<Obj extends Record<string, any>>(obj: Obj): ObjEntries<Obj>;
|
|
105
105
|
type ObjEntries<T, K extends keyof T = keyof T> = (K extends unknown ? [K, T[K]] : never)[];
|
|
106
106
|
/** Mean to fix typing because type for Object.keys is not accurate */
|
|
107
|
-
export declare function objKeys<Obj extends Record<string, any>>(obj: Obj): keyof Obj[];
|
|
107
|
+
export declare function objKeys<Obj extends Record<string, any>>(obj: Obj): (keyof Obj)[];
|
|
108
108
|
export declare const keys: typeof objKeys;
|
|
109
109
|
export declare const entries: typeof objEntries;
|
|
110
110
|
export {};
|
package/package.json
CHANGED
package/src/object-utils.ts
CHANGED
|
@@ -410,7 +410,7 @@ export function objEntries<Obj extends Record<string, any>>(obj: Obj): ObjEntrie
|
|
|
410
410
|
type ObjEntries<T, K extends keyof T = keyof T> = (K extends unknown ? [K, T[K]] : never)[]
|
|
411
411
|
|
|
412
412
|
/** Mean to fix typing because type for Object.keys is not accurate */
|
|
413
|
-
export function objKeys<Obj extends Record<string, any>>(obj: Obj): keyof Obj[] {
|
|
413
|
+
export function objKeys<Obj extends Record<string, any>>(obj: Obj): (keyof Obj)[] {
|
|
414
414
|
return Object.keys(obj) as any
|
|
415
415
|
}
|
|
416
416
|
|