diff --git a/types/passport-local/index.d.ts b/types/passport-local/index.d.ts index 2fe5bde949..9555046fed 100644 --- a/types/passport-local/index.d.ts +++ b/types/passport-local/index.d.ts @@ -6,20 +6,20 @@ /// - - -import { Strategy as PassportStrategy } from 'passport-strategy'; -import express = require('express'); +import { Strategy as PassportStrategy } from "passport-strategy"; +import express = require("express"); interface IStrategyOptions { usernameField?: string; passwordField?: string; + session?: boolean; passReqToCallback?: false; } interface IStrategyOptionsWithRequest { usernameField?: string; passwordField?: string; + session?: boolean; passReqToCallback: true; } @@ -28,15 +28,27 @@ interface IVerifyOptions { } interface VerifyFunctionWithRequest { - (req: express.Request, username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void; + ( + req: express.Request, + username: string, + password: string, + done: (error: any, user?: any, options?: IVerifyOptions) => void + ): void; } interface VerifyFunction { - (username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void; + ( + username: string, + password: string, + done: (error: any, user?: any, options?: IVerifyOptions) => void + ): void; } declare class Strategy extends PassportStrategy { - constructor(options: IStrategyOptionsWithRequest, verify: VerifyFunctionWithRequest); + constructor( + options: IStrategyOptionsWithRequest, + verify: VerifyFunctionWithRequest + ); constructor(options: IStrategyOptions, verify: VerifyFunction); constructor(verify: VerifyFunction);