thiagobustamante / typescript-rest

This is a lightweight annotation-based expressjs extension for typescript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update type definition of passport

SIY1121 opened this issue · comments

Thanks for developing a great framework.

I'm using typescript-rest and some passportjs strategies.
But tsc is failed with the following errors.

node_modules/typescript-rest/node_modules/@types/passport/index.d.ts:14:13 - error TS2717: Subsequent property declarations must have the same type.  Property 'authInfo' must be of type 'AuthInfo | undefined', but here has type 'any'.

14             authInfo?: any;
               ~~~~~~~~

  node_modules/@types/passport/index.d.ts:23:13
    23             authInfo?: AuthInfo;
                   ~~~~~~~~
    'authInfo' was also declared here.

node_modules/typescript-rest/node_modules/@types/passport/index.d.ts:15:13 - error TS2717: Subsequent property declarations must have the same type.  Property 'user' must be of type 'User | undefined', but here has type 'any'.

15             user?: any;
               ~~~~

  node_modules/@types/passport/index.d.ts:24:13
    24             user?: User;
                   ~~~~
    'user' was also declared here.


Found 2 errors.

It seems that @types/passport:0.4.7 (in typescript-rest) and @types/passport:1.0.2 (in my project) are conflicting.

Some other packages (e.g. @types/passport-twitter) are also depends on @types/passport:1.0.2 so I cannot fix my project dependencies.

Could you update dependencies of typescript-rest?
If you wish, I'll create pull request for this issue.

Thank you