jaredhanson / passport-facebook

Facebook authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-facebook/?utm_source=github&utm_medium=referral&utm_campaign=passport-facebook&utm_content=about
MIT License
1.29k stars 446 forks source link

Cannot extend an interface 'passport.Strategy'. #247

Open ba221400 opened 6 years ago

ba221400 commented 6 years ago

node: v8.11.2 npm: 6.1.0 CentOS: 7.4.1708 Docker: 17.09.0-ce, build afdb6d4

When attempting to build (with npm run build and tsc) with passport-facebook (and passport-strategy), I get the following errors:

node_modules/@types/passport-facebook/index.d.ts(50,31): error TS2689: Cannot extend an interface 'passport.Strategy'. Did you mean 'implements'?

node_modules/@types/passport-strategy/index.d.ts(19,32): error TS2689: Cannot extend an interface 'passport.Strategy'. Did you mean 'implements'?

If I manually modify index.d.ts to change export class Strategy extends to export class Strategy implements for both, it will build successfully.

I did some searching in the issues for both projects and on the Google, with no luck yet.

Am I missing something else, or do these projects need updated?

polo2ro commented 6 years ago

Hi, same message with tsc 2.3.4

polo2ro commented 6 years ago

I have successfully used tsc with the --skipLibCheck argument as a workaround.

ba221400 commented 6 years ago

This worked. Thanks @polo2ro

Follow up question -- what are the side effects of this? The tsc docs simply say Skip type checking of all declaration files (*.d.ts). Reading more here leads me to think it is likely benign.

wermetal commented 5 years ago

Have the same issue. I don't want to use --skipLibCheck just for one broken package

rwky commented 5 years ago

Could someone see if this happens on this module https://github.com/passport-next/passport-facebook if it does raise an issue there and we'll look into it.