Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Jul 15, 2017 · 3 comments
Closed

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

ghost opened this issue Jul 15, 2017 · 3 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Jul 15, 2017

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.

@ghost ghost added Salsa Bug A bug in TypeScript labels Jul 15, 2017
@mhegazy mhegazy assigned ghost Oct 18, 2017
@mhegazy mhegazy added this to the TypeScript 2.7 milestone Oct 18, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Nov 1, 2017
@somzJosf
Copy link

somzJosf commented Nov 2, 2017

Is this the same as previously fixed #11324 ? I am still getting the issue mentioned at #11324 with typescript 2.6.1 version and latest nightly build 2.7.0-dev.20171102

@mhegazy
Copy link
Contributor

mhegazy commented Nov 2, 2017

Is this the same as previously fixed #11324

no. this is a different one.

I am still getting the issue mentioned at #11324 with typescript 2.6.1 version and latest nightly build 2.7.0-dev.20171102

please file a new issue and give us some context to be able to investigate.

@somzJosf
Copy link

somzJosf commented Nov 2, 2017

Done. #19700

@ghost ghost closed this as completed in #19612 Nov 4, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants