loading...

Discussion on: Extending express request/response objects in Typescript

Collapse
hosseinnedaee profile image
Hossein Nedaee

thanks, useful
where should we put these extends? I mean a filelike custom.d.ts and add then how to add it to tsconfig.json

Collapse
joeflateau profile image
Joe Flateau Author

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.