hisco / http2-client

Transparently make http request to both http1 / http2 server.
https://www.npmjs.com/package/http2-client
MIT License
33 stars 14 forks source link

Typescript support #13

Closed arve0 closed 4 years ago

arve0 commented 5 years ago

Hi! Thanks for the lib. Would be nice to have support for typescript.

Now I have to declare the module manually in types.d.ts:

declare module 'http2-client' {
    import { RequestOptions, IncomingMessage, ClientRequest } from 'http'

    let request: (options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void) => ClientRequest
}
hisco commented 5 years ago

Correct! will do..

Thank you