Skip to content

--noUnusedLocals does not work at top-level of commonJS module #17221

@ghost

Description

TypeScript Version: nightly (2.5.0-dev.20170712)

Code

const a = 1;
const b = 2;
{
	const c = 3;
}

module.exports = { a };

Expected behavior:

Errors for both b and c.

Actual behavior:

Only error for c.

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