diff --git a/types/basic-auth/index.d.ts b/types/basic-auth/index.d.ts index 3af8f5a699..ad1b09f746 100644 --- a/types/basic-auth/index.d.ts +++ b/types/basic-auth/index.d.ts @@ -1,14 +1,15 @@ // Type definitions for basic-auth 1.1 // Project: https://github.com/jshttp/basic-auth -// Definitions by: Clément Bourgeois , Vesa Poikajärvi +// Definitions by: Clément Bourgeois , Vesa Poikajärvi , Ryo Ota // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// import * as http from 'http'; +import * as http2 from 'http2'; // See https://github.com/jshttp/basic-auth/blob/v1.1.0/index.js#L49 -declare function auth(req: http.IncomingMessage): auth.BasicAuthResult | undefined; +declare function auth(req: http.IncomingMessage | http2.Http2ServerRequest): auth.BasicAuthResult | undefined; declare namespace auth { interface BasicAuthResult {