-
I'm rebuilding a large bit of microservice infrastructure around Typescript and Express 5. In general it's going well, BUT, because the Express Request/App/Response types force the generic type arguments for locals to extend from Record<string, any>, I can't get proper type checking on those locals. If you misspell a property name, TS doesn't care. Should we just remove the type constraint there? Or should it extend |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You're probably using Questions regarding express and its TypeScript type definitions should be asked here: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions?discussions_q=express |
Beta Was this translation helpful? Give feedback.
You're probably using
@types/express
package, which is a part of DefinitelyTyped project. Express itself does not contain type definitions.Questions regarding express and its TypeScript type definitions should be asked here: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions?discussions_q=express