UNPKG

tg-map-vue3

Version:

封装 百度地图, Google地图, Here地图(未完成) 的Vue3组件库

28 lines (27 loc) 1.23 kB
export declare namespace Objects { function fromArray<T>(arr: T[], keySelector: (it: T) => string): { [key: string]: T; }; function fromEntries<V>(entries: [string, V][]): { [k: string]: V; }; function toJsonSafely(value: any): string; /** 删除obj中纯对象上的值为undefined的属性 */ function deleteUndefinedPropertyOnPlainObjectDeeply(obj: any): void; /** 存在则返回, 不存在则新建 */ function putIfAbsent<K extends keyof any, V>(obj: Record<K, V>, key: K, ifAbsent: () => Exclude<V, undefined>): Exclude<V, undefined>; /** @see Omit */ function omit<T, K extends keyof any>(obj: T, ...keys: K[]): Omit<T, K>; /** @see Pick */ function pick<T, K extends keyof T>(obj: T, ...keys: K[]): Pick<T, K>; /** * 使用{@link keyPath}读取`obj`的字段 * * @param keyPath `.`分隔的字段名 或 字段名数组 * @returns 若字段不存在, 则返回`undefined` */ function get(obj: any, keyPath: string | string[]): any; function del(obj: any, keyPath: string | string[]): any; } /** 用于替代Vue2中的filter, 直接交给模板使用 */ export declare const stringify: typeof Objects.toJsonSafely;