diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index a4a1144872..ec2808cf3d 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/apocas/dockerode // Definitions by: Carl Winkler , Nicolas Laplante // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// @@ -637,7 +638,7 @@ declare namespace Dockerode { interface DockerOptions { socketPath?: string; host?: string; - port?: number; + port?: number | string; ca?: string; cert?: string; key?: string; diff --git a/types/jake/index.d.ts b/types/jake/index.d.ts index cb23f992f0..6abb7e125c 100644 --- a/types/jake/index.d.ts +++ b/types/jake/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/mde/jake // Definitions by: Kon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/libpq/index.d.ts b/types/libpq/index.d.ts index 49c00db818..d336d95c9f 100644 --- a/types/libpq/index.d.ts +++ b/types/libpq/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/brianc/node-libpq#readme // Definitions by: Vlad Rindevich // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.2 /// diff --git a/types/main-bower-files/index.d.ts b/types/main-bower-files/index.d.ts index 0a00b19b8b..f3cc5e7228 100644 --- a/types/main-bower-files/index.d.ts +++ b/types/main-bower-files/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/ck86/main-bower-files // Definitions by: Keita Kagurazaka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 131dbc96a1..21d48b504a 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -400,6 +400,10 @@ declare namespace NodeJS { isTTY?: true; } + export interface ProcessEnv { + [key: string]: string | undefined + } + export interface Process extends EventEmitter { stdout: Socket; stderr: Socket; @@ -413,7 +417,7 @@ declare namespace NodeJS { chdir(directory: string): void; cwd(): string; emitWarning(warning: string | Error, name?: string, ctor?: Function): void; - env: any; + env: ProcessEnv; exit(code?: number): never; exitCode: number; getgid(): number; diff --git a/types/passport-beam/index.d.ts b/types/passport-beam/index.d.ts index 7d34ef4173..852ac6f698 100644 --- a/types/passport-beam/index.d.ts +++ b/types/passport-beam/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/alfw/passport-beam // Definitions by: AtlasDev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// /// @@ -31,4 +32,4 @@ export namespace Strategy { _raw: any; _json: any; } -} \ No newline at end of file +} diff --git a/types/passport-facebook-token/index.d.ts b/types/passport-facebook-token/index.d.ts index 173992a701..49bfc62d11 100644 --- a/types/passport-facebook-token/index.d.ts +++ b/types/passport-facebook-token/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/drudge/passport-facebook-token // Definitions by: Ray Martone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/passport-facebook/index.d.ts b/types/passport-facebook/index.d.ts index cd35cbe0c8..01db85012d 100644 --- a/types/passport-facebook/index.d.ts +++ b/types/passport-facebook/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jaredhanson/passport-facebook // Definitions by: James Roland Cabresos , Lucas Acosta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/passport-github/index.d.ts b/types/passport-github/index.d.ts index 38704a0a88..0b0880bb05 100644 --- a/types/passport-github/index.d.ts +++ b/types/passport-github/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jaredhanson/passport-github // Definitions by: Yasunori Ohoka // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import passport = require('passport'); import express = require('express'); diff --git a/types/passport-github/passport-github-tests.ts b/types/passport-github/passport-github-tests.ts index 72697a7dd2..10c24a366d 100644 --- a/types/passport-github/passport-github-tests.ts +++ b/types/passport-github/passport-github-tests.ts @@ -11,11 +11,27 @@ const User = { } }; +const callbackURL = process.env.PASSPORT_GITHUB_CALLBACK_URL; +const clientID = process.env.PASSPORT_GITHUB_CONSUMER_KEY; +const clientSecret = process.env.PASSPORT_GITHUB_CONSUMER_SECRET; + +if (typeof callbackURL === "undefined") { + throw new Error("callbackURL is undefined"); +} + +if (typeof clientID === "undefined") { + throw new Error("clientID is undefined"); +} + +if (typeof clientSecret === "undefined") { + throw new Error("clientSecret is undefined"); +} + passport.use(new github.Strategy( { - clientID: process.env.PASSPORT_GITHUB_CONSUMER_KEY, - clientSecret: process.env.PASSPORT_GITHUB_CONSUMER_SECRET, - callbackURL: process.env.PASSPORT_GITHUB_CALLBACK_URL + callbackURL, + clientID, + clientSecret }, (accessToken: string, refreshToken: string, profile: github.Profile, done: (error: any, user?: any) => void) => { User.findOrCreate(profile.id, profile.provider, (err, user) => { diff --git a/types/passport-google-oauth/index.d.ts b/types/passport-google-oauth/index.d.ts index 50930a45ad..cefd05fe20 100644 --- a/types/passport-google-oauth/index.d.ts +++ b/types/passport-google-oauth/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jaredhanson/passport-facebook // Definitions by: James Roland Cabresos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/passport-twitter/index.d.ts b/types/passport-twitter/index.d.ts index f819ef721d..41cee10286 100644 --- a/types/passport-twitter/index.d.ts +++ b/types/passport-twitter/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jaredhanson/passport-twitter // Definitions by: James Roland Cabresos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/pg-types/package.json b/types/pg-types/package.json index 4c6d24a445..d33ff913ce 100644 --- a/types/pg-types/package.json +++ b/types/pg-types/package.json @@ -2,4 +2,4 @@ "dependencies": { "moment": ">=2.14.0" } -} \ No newline at end of file +} diff --git a/types/pty.js/index.d.ts b/types/pty.js/index.d.ts index 49acad6260..c54022279b 100644 --- a/types/pty.js/index.d.ts +++ b/types/pty.js/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/chjj/pty.js // Definitions by: Vadim Macagon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/stylus/index.d.ts b/types/stylus/index.d.ts index a2a75b2ebc..47854aaf60 100644 --- a/types/stylus/index.d.ts +++ b/types/stylus/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/LearnBoost/stylus // Definitions by: Maxime LUCE // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// diff --git a/types/swagger-express-mw/index.d.ts b/types/swagger-express-mw/index.d.ts index 04c09866d6..104bd0fc39 100644 --- a/types/swagger-express-mw/index.d.ts +++ b/types/swagger-express-mw/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/apigee-127/swagger-express#readme // Definitions by: Michael Mrowetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /* =================== USAGE =================== diff --git a/types/swagger-hapi/index.d.ts b/types/swagger-hapi/index.d.ts index 2c723cbf61..7e62dbbdbb 100644 --- a/types/swagger-hapi/index.d.ts +++ b/types/swagger-hapi/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/apigee-127/swagger-hapi#readme // Definitions by: Michael Mrowetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /* =================== USAGE =================== diff --git a/types/swagger-node-runner/index.d.ts b/types/swagger-node-runner/index.d.ts index 033abb434b..79118bb2e5 100644 --- a/types/swagger-node-runner/index.d.ts +++ b/types/swagger-node-runner/index.d.ts @@ -2,6 +2,7 @@ // Project: https://www.npmjs.com/package/swagger-node-runner // Definitions by: Michael Mrowetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /* =================== USAGE =================== diff --git a/types/swagger-restify-mw/index.d.ts b/types/swagger-restify-mw/index.d.ts index c9518b2ecb..efc63693f3 100644 --- a/types/swagger-restify-mw/index.d.ts +++ b/types/swagger-restify-mw/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/apigee-127/swagger-restify#readme // Definitions by: Michael Mrowetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /* =================== USAGE =================== import * as SwaggerRestify from "swagger-restify-mw"; diff --git a/types/swagger-tools/index.d.ts b/types/swagger-tools/index.d.ts index 09d42138b6..a697e9d7e8 100644 --- a/types/swagger-tools/index.d.ts +++ b/types/swagger-tools/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/apigee-127/swagger-tools // Definitions by: Alex Brick // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 import { NextHandleFunction } from 'connect'; import { IncomingMessage } from 'http';