Skip to content

checkJs too strict about module.exports assignment #15647

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

I was trying to run with // @ts-check on a webpack config file. Unfortunately, it choked on the following simplified repro:

// @ts-check

module.exports = {
    a: 100,
    b: 200,
}

module.exports.devtool = true;

I get

severity: 'Error'
message: 'An export assignment cannot be used in a module with other exported elements.'
at: '3,1'
source: 'js'

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