Skip to content

Unable to do module augmentation (1.8 beta) #6722

Closed
@bytenik

Description

@bytenik
import { Request } from 'express';

declare module 'express' {
    interface Request {
        id: number;        
    }    
}

The above code sits alone in a file that I then import from various locations.

The code fails to compile, warning Module augmentation cannot introduce new names in the top level scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions