chore(passport-x): declare passport-oauth1 exports for TS7 - #41311
Conversation
|
WalkthroughThe OAuth1 TypeScript declarations now namespace related types under ChangesOAuth1 declaration namespace
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Looks like this PR is ready to merge! 🎉 |
|
/jira ARCH-2200 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #41311 +/- ##
===========================================
- Coverage 68.68% 68.65% -0.04%
===========================================
Files 4135 4135
Lines 160461 160461
Branches 29186 29231 +45
===========================================
- Hits 110215 110162 -53
- Misses 45137 45182 +45
- Partials 5109 5117 +8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
… for TS7
The ambient declaration mixed `export =` with `export { ... }`, which TS7
rejects (InternalOAuthError resolved as no exported member). Move the named
members into a namespace merged with the default export.
ea054f5 to
4032d4d
Compare
Summary
Fixes the ambient
passport-oauth1declaration inpassport-xsoInternalOAuthErrorresolves under TypeScript 7.Why
The declaration mixed
export = OAuthStrategywith a separateexport { InternalOAuthError, ... }. TS7 rejects that combination, soimport OAuthStrategy, { InternalOAuthError } from 'passport-oauth1'failed withTS2305(no exported member). The runtime module does export it (exports.InternalOAuthError = ...).Move the named members into a
namespace OAuthStrategymerged with the default class — the canonical way to type a CommonJS module that has bothmodule.exports = Xandexports.Y. Green on both TS5.x and TS7.Draft — part of the TS7-readiness set.
Task: ARCH-2244
Summary by CodeRabbit