DEV Community

Discussion on: Extending express request/response objects in Typescript

Collapse
 
joeflateau profile image
Joe Flateau

Hossein, you don't have to put it in a *.d.ts or touch tsconfig.json at all. Just put the declare module "foo" {} in the .ts file where you also patch the new method in and you'll be 👌

Collapse
 
hosseinnedaee profile image
Hossein Nedaee

Thanks Joe.