From ee619a0597282ea6de017ff65ec13523dc5c9d38 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Tue, 4 Dec 2018 16:19:40 -0200 Subject: [PATCH] correcting code style --- types/passport-oauth2/index.d.ts | 2 +- types/passport-oauth2/passport-oauth2-tests.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/types/passport-oauth2/index.d.ts b/types/passport-oauth2/index.d.ts index a6d519bf6a..cd78f377c2 100644 --- a/types/passport-oauth2/index.d.ts +++ b/types/passport-oauth2/index.d.ts @@ -40,7 +40,7 @@ declare namespace OAuth2Strategy { } type StateStoreStoreCallback = (err: Error | null, state: any) => void; - type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void + type StateStoreVerifyCallback = (err: Error, ok: boolean, state: any) => void; interface StateStore { store(req: Request, callback: StateStoreStoreCallback): void; diff --git a/types/passport-oauth2/passport-oauth2-tests.ts b/types/passport-oauth2/passport-oauth2-tests.ts index 57dcfa56d9..30faeebda0 100644 --- a/types/passport-oauth2/passport-oauth2-tests.ts +++ b/types/passport-oauth2/passport-oauth2-tests.ts @@ -1,5 +1,6 @@ import OAuth2Strategy = require('passport-oauth2'); -import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; +import { Strategy, StrategyOptions, StrategyOptionsWithRequest, VerifyCallback, AuthorizationError, TokenError, + InternalOAuthError, Metadata, StateStore, StateStoreStoreCallback, StateStoreVerifyCallback } from 'passport-oauth2'; import { Strategy as PassportStrategy } from 'passport'; import { Request } from 'express'; @@ -61,14 +62,14 @@ const metadata: Metadata = { authorizationURL: 'http://www.example.com/auth', clientID: 'dummy', tokenURL: 'http://www.example.com/token' -} +}; class MyStore implements StateStore { store(req: Request, meta: StateStoreStoreCallback | Metadata, callback?: StateStoreStoreCallback): void {} verify(req: Request, state: string, meta: StateStoreVerifyCallback | Metadata, callback?: StateStoreVerifyCallback): void {} } -const myStore = new MyStore; +const myStore = new MyStore(); const strategyOptions3: StrategyOptions = { authorizationURL: 'http://www.example.com/auth',