Skip to content

Duplicate identifier error in services for commonjs module.exports.prop =  #24024

Closed
@ghost

Description

TypeScript Version: 2.9.0-dev.20180510

Code

a.js

module.exports = class C {};
module.exports.D = class D {};

b.js

const a = require("./a");

Open the two tabs side-by-side in an editor. Initially there is no error, but when you make any edit (e.g., adding a newline) to b.js, then module.exports.D in a.js is marked with an error Duplicate identifier 'D'. (Making any edit to a.js will make it go away, but then editing b.js makes it come back...)

CC @sandersn

Metadata

Metadata

Assignees

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