Files
NapCatQQ/.pnpm-store/v3/files/de/0069abc87b116466f552a6cce6e681183a48f960c7b3644009e8bf88b29f620ce1c585dcac12c7b8db4cce5ddfed81b897de335093f4aa1603013058682847
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

32 lines
1.2 KiB
Plaintext

type Key = string | number;
interface MergeObject {
[key: string]: any;
}
declare const renameProp: (oldProp: string, newProp: string, { [oldProp]: old, ...others }: {
[x: string]: any;
}) => {
[x: string]: any;
};
declare const copyObject: (obj: any) => any;
declare const omitObject: (obj: any, omitKeys: string[]) => any;
declare const cleanObject: (obj: any) => any;
declare const cleanObjectKeys: (obj: any, keys?: string[]) => any;
declare const getKeyValue: (obj: any, key: Key) => any;
/**
* Get value from a deeply nested object using a string path.
* Memorizes the value.
* @param obj - the object
* @param path - the string path
* @param fallback - the fallback value
*/
declare const getProp: (obj: Record<string, any>, path: string | number, fallback?: any, index?: number) => any;
/**
* Converting an array of objects into a single object.
* @param arr - the array of objects
* @returns the single object
*/
declare const arrayToObject: (arr: any[]) => any;
declare function compact<T extends Record<any, any>>(object: T): {} & T;
export { type MergeObject, arrayToObject, cleanObject, cleanObjectKeys, compact, copyObject, getKeyValue, getProp, omitObject, renameProp };