From b422c432ddca8ca734ba05bb2f7f25b815a8dd43 Mon Sep 17 00:00:00 2001 From: Pavel Puchkov <0x6368656174@gmail.com> Date: Wed, 18 Jan 2017 16:40:41 +1000 Subject: [PATCH] Add types for https://github.com/jaredhanson/passport-anonymous (#14016) * Add "movieImages()" method, add "language" opional parametr * Change Definitions by * Add types for https://github.com/jaredhanson/connect-ensure-login * Add tslint.json for connect-ensure-login * Remove module from connect-ensure-login * Set strictNullChecks to true in connect-ensure-login * Add definitions for https://github.com/jaredhanson/passport-anonymous * Fix tests * fix import * fix import --- passport-anonymous/index.d.ts | 10 ++++++++++ .../passport-anonymous-tests.ts | 4 ++++ passport-anonymous/tsconfig.json | 20 +++++++++++++++++++ passport-anonymous/tslint.json | 3 +++ 4 files changed, 37 insertions(+) create mode 100644 passport-anonymous/index.d.ts create mode 100644 passport-anonymous/passport-anonymous-tests.ts create mode 100644 passport-anonymous/tsconfig.json create mode 100644 passport-anonymous/tslint.json diff --git a/passport-anonymous/index.d.ts b/passport-anonymous/index.d.ts new file mode 100644 index 0000000000..a7c9e5b332 --- /dev/null +++ b/passport-anonymous/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for passport-anonymous 1.0 +// Project: https://github.com/jaredhanson/passport-anonymous +// Definitions by: Pavel Puchkov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as passport from "passport"; + +export class Strategy implements passport.Strategy { + authenticate: () => void; +} \ No newline at end of file diff --git a/passport-anonymous/passport-anonymous-tests.ts b/passport-anonymous/passport-anonymous-tests.ts new file mode 100644 index 0000000000..3daa2474cf --- /dev/null +++ b/passport-anonymous/passport-anonymous-tests.ts @@ -0,0 +1,4 @@ +import * as passport from "passport"; +import { Strategy } from "passport-anonymous"; + +passport.use(new Strategy()); diff --git a/passport-anonymous/tsconfig.json b/passport-anonymous/tsconfig.json new file mode 100644 index 0000000000..8414fad459 --- /dev/null +++ b/passport-anonymous/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "passport-anonymous-tests.ts" + ] +} \ No newline at end of file diff --git a/passport-anonymous/tslint.json b/passport-anonymous/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/passport-anonymous/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +}