@chatie/grpc
Version:
gRPC for Chatie
49 lines • 2.15 kB
TypeScript
import { PuppetClient } from '../src/';
/**
* Issue #7: https://github.com/Chatie/grpc/issues/7
*/
export declare type Callback<T> = (err: Error | null, reply: T) => void;
export declare type PromisifyOne<T extends any[]> = T extends [Callback<infer U>?] ? () => Promise<U> : T extends [infer T1, Callback<infer P>?] ? (arg1: T1) => Promise<P> : T extends [infer T1, infer T2, Callback<infer U>?] ? (arg1: T1, arg2: T2) => Promise<U> : T extends [infer T1, infer T2, infer T3, Callback<infer U>?] ? (arg1: T1, arg2: T2, arg3: T3) => Promise<U> : T extends [infer T1, infer T2, infer T3, infer T4, Callback<infer U>?] ? (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<U> : never;
export declare type GetOverloadArgs<T> = T extends {
(...o: infer U): void;
(...o: infer U2): void;
(...o: infer U3): void;
(...o: infer U4): void;
(...o: infer U5): void;
(...o: infer U6): void;
(...o: infer U7): void;
} ? U | U2 | U3 | U4 | U5 | U6 | U7 : T extends {
(...o: infer U): void;
(...o: infer U2): void;
(...o: infer U3): void;
(...o: infer U4): void;
(...o: infer U5): void;
(...o: infer U6): void;
} ? U | U2 | U3 | U4 | U5 | U6 : T extends {
(...o: infer U): void;
(...o: infer U2): void;
(...o: infer U3): void;
(...o: infer U4): void;
(...o: infer U5): void;
} ? U | U2 | U3 | U4 | U5 : T extends {
(...o: infer U): void;
(...o: infer U2): void;
(...o: infer U3): void;
(...o: infer U4): void;
} ? U | U2 | U3 | U4 : T extends {
(...o: infer U): void;
(...o: infer U2): void;
(...o: infer U3): void;
} ? U | U2 | U3 : T extends {
(...o: infer U): void;
(...o: infer U2): void;
} ? U | U2 : T extends {
(...o: infer U): void;
} ? U : never;
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
export declare type Promisify<T> = UnionToIntersection<PromisifyOne<GetOverloadArgs<T>>>;
declare module 'util' {
function promisify<T>(fn: T): Promisify<T>;
}
export declare function testStream(client: PuppetClient): void;
//# sourceMappingURL=client.d.ts.map