You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you add import or export to a top-level declaration, the file becomes a module, and declarations of interfaces create new types in your module scope rather than augment existing interfaces declared at the global scope.
To fix this, move the interfaces you want to augment to a separate .d.ts file.
Alright. That explains why it can't find the interfaces anymore, but not how I can achieve what I want. The interfaces I created are in their own .d.ts file. I18nextStatic is a top-level declaration in the i18next.d.ts, i.e. it's not part of any module. How do I augment this interface with express types without importing express? If i18next.d.ts declared I18nextStatic in a module, then Id just redeclare that module and importing express wouldn't be an issue.
I'm trying to merge some missing methods from https://github.com/borisyankov/DefinitelyTyped/blob/master/i18next/i18next.d.ts for my node server.
This compiles and works, however I'd like to change all those app any types to express types. If I add
to the file, the compiler says it can't find the other interfaces anymore.
The text was updated successfully, but these errors were encountered: