Skip to content

checkJs too strict about module.exports assignment #15647

Description

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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