File size: 829 Bytes
6655e35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import type { AsyncFunction, AsyncFunctionConstructor } from 'async-function';

type AGF = AsyncGeneratorFunction;

declare namespace getAsyncGeneratorFunction {
    interface AsyncGeneratorFunction extends AGF, AsyncFunction {
        readonly [Symbol.toStringTag]: "AsyncGeneratorFunction";
    }
    
    // The constructor for an async generator function, like `(async function*(){}).constructor`
    interface AsyncGeneratorFunctionConstructor {
        (...args: string[]): AsyncGeneratorFunction;
        new (...args: string[]): AsyncGeneratorFunction;
        readonly prototype: AsyncGeneratorFunction;
    }

    export type { AsyncGeneratorFunctionConstructor };
}

declare function getAsyncGeneratorFunction(): getAsyncGeneratorFunction.AsyncGeneratorFunctionConstructor | false;

export = getAsyncGeneratorFunction;