fix(passport-x): declare passport-oauth1 exports for TS7#41311
Conversation
… 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.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (4)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (3)📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
🔇 Additional comments (2)
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 not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
/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.98% 68.91% -0.07%
===========================================
Files 3755 3755
Lines 147158 147593 +435
Branches 26309 26304 -5
===========================================
+ Hits 101510 101718 +208
- Misses 41147 41375 +228
+ Partials 4501 4500 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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