diff --git a/basic-auth/basic-auth-tests.ts b/basic-auth/basic-auth-tests.ts new file mode 100644 index 0000000000..54be7af1f4 --- /dev/null +++ b/basic-auth/basic-auth-tests.ts @@ -0,0 +1,5 @@ +/// + +import auth = require('basic-auth'); + +auth(null); diff --git a/basic-auth/basic-auth.d.ts b/basic-auth/basic-auth.d.ts new file mode 100644 index 0000000000..e039989971 --- /dev/null +++ b/basic-auth/basic-auth.d.ts @@ -0,0 +1,19 @@ +// Type definitions for basic-auth +// Project: https://github.com/jshttp/basic-auth +// Definitions by: Clément Bourgeois +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module BasicAuth { + export interface BasicAuthResult { + name:string; + pass:string; + } +} + +declare module "basic-auth" { + function auth(req: Express.Request): BasicAuth.BasicAuthResult; + + export = auth; +}