import type { MapLike } from './map-like.js'; declare type MapLikeNoSync = Omit, typeof Symbol.toStringTag | typeof Symbol.iterator>; declare type IteratorMethod = 'entries' | 'keys' | 'values'; declare type GetMethod = 'get'; declare type AnyFunction = (...args: any) => any; declare type AsyncifyIterator> = R extends IterableIterator ? AsyncIterableIterator : never; /** * Asyncify Functions */ declare type AsyncifyIteratorFunction = (...args: Parameters) => AsyncifyIterator>; declare type AsyncifyBooleanFunction = (...args: Parameters) => Promise; declare type AsyncifyMapFunction = (...args: Parameters) => Promise>; declare type AsyncifySimpleFunction = (...args: Parameters) => Promise>; declare type Asyncify = T extends AnyFunction ? /** * Methods */ NAME extends IteratorMethod ? AsyncifyIteratorFunction : NAME extends GetMethod ? AsyncifySimpleFunction : NAME extends Symbol ? AsyncifyIteratorFunction : ReturnType extends boolean ? AsyncifyBooleanFunction : ReturnType extends Map ? AsyncifyMapFunction : AsyncifySimpleFunction : Promise; declare type AsyncMapBase = { [N in keyof MapLikeNoSync]: Asyncify[N]>; }; interface AsyncMapIterator { /** * Huan(202111): we have removed the `[Symbol.iterator]`, and add the below `[Symbol.asyncIterator]` for Async */ [Symbol.asyncIterator]: () => AsyncifyIterator[typeof Symbol.iterator]>>; } declare type AsyncMapLike = AsyncMapBase & AsyncMapIterator; export type { AsyncMapLike, }; //# sourceMappingURL=async-map-like.d.ts.map