diff --git a/passport-beam/index.d.ts b/passport-beam/index.d.ts new file mode 100644 index 0000000000..4681c911a8 --- /dev/null +++ b/passport-beam/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for passport-beam 1.0.4 +// Project: https://github.com/alfw/passport-beam +// Definitions by: AtlasDev +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as passport from 'passport'; + +declare class Strategy implements passport.Strategy { + constructor(options: Strategy.IStrategyOption, verify: (accessToken: string, refreshToken: string, profile: Strategy.Profile, done: (error: any, user?: any) => void) => void); +} + +declare namespace Strategy { + interface IStrategyOption { + clientID: string; + clientSecret: string; + callbackURL: string; + } + + interface Profile extends passport.Profile { + profileUrl: string; + id: number + username: string; + provider: string; + email: string; + _raw: string; + _json: any; + } +} + +export Strategy; \ No newline at end of file diff --git a/passport-beam/passport-beam-tests.ts b/passport-beam/passport-beam-tests.ts index 29d59218b3..a9c4f03cb2 100644 --- a/passport-beam/passport-beam-tests.ts +++ b/passport-beam/passport-beam-tests.ts @@ -1,4 +1,4 @@ -/// +/// /** * Created by AtlasDev on 4/10/2016. diff --git a/passport-beam/passport-beam.d.ts b/passport-beam/passport-beam.d.ts deleted file mode 100644 index 495ed2589e..0000000000 --- a/passport-beam/passport-beam.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Type definitions for passport-beam 1.0.4 -// Project: https://github.com/alfw/passport-beam -// Definitions by: AtlasDev -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module "passport-beam" { - - import * as passport from 'passport'; - import * as express from 'express'; - - interface Profile extends passport.Profile { - gender: string; - profileUrl: string; - id: number - username: string; - provider: string; - email: string; - - _raw: string; - _json: any; - } - - interface IStrategyOption { - clientID: string; - clientSecret: string; - callbackURL: string; - } - - class Strategy implements passport.Strategy { - constructor(options: IStrategyOption, verify: (accessToken: string, refreshToken: string, profile: any, done: (error: any, user?: any) => void) => void); - name: string; - authenticate: (req: express.Request, options?: Object) => void; - } - -} \ No newline at end of file diff --git a/passport-beam/tsconfig.json b/passport-beam/tsconfig.json new file mode 100644 index 0000000000..200f26cfa7 --- /dev/null +++ b/passport-beam/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "passport-beam-tests.ts" + ] +} \ No newline at end of file