Skip to content

Commit 695bc28

Browse files
committed
export type VerifyCallback for typescript usage
1 parent 6f927a3 commit 695bc28

File tree

4 files changed

+315
-256
lines changed

4 files changed

+315
-256
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "passport-google-oauth-token",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Google access token authentication strategy for Passport",
55
"keywords": [
66
"passport",

types/.eslintrc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636
"error",
3737
"always-multiline"
3838
],
39-
"no-unused-vars": [
40-
"error",
41-
{
42-
"argsIgnorePattern": "^_"
43-
}
44-
],
4539
"global-require": "off",
4640
"indent": [
4741
"error",

types/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ declare namespace PassportGoogleOauthToken {
5050
passReqToCallback: true;
5151
}
5252

53-
type VerifyFunction = (accessToken: string, refreshToken: string, profile: Profile, cb: (error: any, user?: any, info?: any) => void) => void;
53+
type VerifyCallback = (error: any, user?: any, info?: any) => void;
5454

55-
type VerifyFunctionWithRequest = (req: express.Request, accessToken: string, refreshToken: string, profile: Profile, cb: (error: any, user?: any, info?: any) => void) => void;
55+
type VerifyFunction = (accessToken: string, refreshToken: string, profile: Profile, cb: VerifyCallback) => void;
56+
57+
type VerifyFunctionWithRequest = (req: express.Request, accessToken: string, refreshToken: string, profile: Profile, cb: VerifyCallback) => void;
5658
}
5759

5860
declare const PassportGoogleOauthToken: PassportGoogleOauthToken.StrategyStatic;

0 commit comments

Comments
 (0)