@neovici/cosmoz-utils 5.17.0 → 5.18.0
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/object.d.ts +2 -2
- package/package.json +1 -1
package/dist/object.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { identity } from './function';
|
|
|
2
2
|
export type Rec<K extends PropertyKey = PropertyKey, V = any> = Record<K, V>;
|
|
3
3
|
export declare function prop(): typeof identity;
|
|
4
4
|
export declare function prop(a: '' | null | false | undefined | 0): typeof identity;
|
|
5
|
-
export declare function prop<K extends PropertyKey>(key
|
|
6
|
-
export declare const strProp: <K extends PropertyKey>(key
|
|
5
|
+
export declare function prop<K extends PropertyKey>(key?: K): <O>(obj: O) => K extends keyof O ? O[K] : undefined;
|
|
6
|
+
export declare const strProp: <K extends PropertyKey>(key?: K | undefined) => <O>(o: O) => string;
|
|
7
7
|
export declare const transform: <K extends string, V, RK extends PropertyKey, RV>(obj: Record<K, V>, trans: (entries: [Extract<K, string>, V][]) => Iterable<readonly [RK, RV]>) => { [key in RK]: RV; };
|
|
8
8
|
export declare const omit: <K extends PropertyKey>(keys: K[]) => <T extends Rec<PropertyKey, any>>(obj: T) => { [key in Exclude<keyof T, K>]: T[key]; };
|
|
9
9
|
export declare const props: <K extends PropertyKey>(keys: K[]) => <T extends Rec<PropertyKey, any>>(obj: T) => { [key in K & keyof T]: T[key]; };
|