fix: use namespace instead of module keyword for TS 6/7 compat#2249
Conversation
…ompatibility
TypeScript 6+ (and tsgo from 7.0.0-dev.20260221.1) now errors on
non-ambient `declare module Foo {}` declarations (TS1540), requiring
`declare namespace Foo {}` instead.
This was deprecated in microsoft/TypeScript#62876 (merged Dec 2025).
The `module` and `namespace` keywords are functionally identical for
this use case, so this is a purely syntactic change with no runtime
or type-level impact.
Fixes #2248
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change updates the TypeScript type declarations in Dexie's public API to replace the deprecated Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
See dexie#2249. We'll use this vendored version until fixed upstream.
Summary
Fixes #2248
TypeScript 6+ (and
tsgofrom7.0.0-dev.20260221.1) now errors on non-ambientdeclare module Foo {}declarations (TS1540), requiringdeclare namespace Foo {}instead.This PR changes the single occurrence in
src/public/index.d.ts(line 42):The
moduleandnamespacekeywords are functionally identical for this use case — this is a purely syntactic change with no runtime or type-level impact.Verified
declare modulein the repoDexie.Syncable,Dexie.Observable,dexie-cloud) all usedeclare module 'dexie'(quoted string — ambient module augmentation), which is valid and unaffectedtsgodev builds to confirm the breaking change was introduced in7.0.0-dev.20260221.1(Feb 21, 2026)Summary by CodeRabbit