Skip to content

Different compilation results from tsc #1093

Closed
@akopchinskiy

Description

@akopchinskiy

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

Related Issues

#391

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions