Closed
Description
Expected Behavior
no errors
Actual Behavior
src/api/main.ts:12:18 - error TS2339: Property 'sendFormatted' does not exist on type 'Response'.
Steps to reproduce the problem
try to augment 'express-serve-static-core' module through a d.ts file
Code
// types.d.ts
declare module 'express-serve-static-core' {
import { ResponseFormatterData } from './middlewares/response';
interface Response {
sendFormatted(data?: ResponseFormatterData) : Response<any>
}
}
Details
node : v14.7.0
npm : 6.14.7
tsc : 3.9.7
ts-node : v8.10.2
Win 10