Skip to content

Incompatibility with typescript 6/7 #2248

@AntonOfTheWoods

Description

@AntonOfTheWoods

https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html

Apparently in typescript 6 and 7 (from 7.0.0-dev.20260222.1 onwards) dexie@4.3.0 (and probably many previous versions) is not longer valid. We are now getting the following errors:

error TS1540: A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.

According to a typescript maintainer, this is silenceable in 6 but from now on will error in 7. From what I can tell, this is probably what Note: In very old versions of TypeScript namespaces were called ‘Internal Modules’, these pre-date JavaScript module systems. is referring to, and this might be because the typescript for this was written a long time ago?

In any case, the typescript maintainer is pretty adamant that is something that will need to be fixed in dexie. If you agree, I'll submit a patch to simply use namespace instead of module in the offending places in the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions