Skip to content

Unused Variable for import used in object literal property value shorthand #7280

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

Closed
unional opened this issue Feb 28, 2016 · 5 comments
Closed
Labels
External Relates to another program, environment, or user action which we cannot control.

Comments

@unional
Copy link
Contributor

unional commented Feb 28, 2016

TypeScript Version:
1.8.2

Code

import funcA from './funcA'; // Unused Variable 'funcA'

// either
export default {
  funcA
}

// or
let a = {
  funcA
};
@mhegazy
Copy link
Contributor

mhegazy commented Feb 29, 2016

I can not piece together the issue here. is this unused variable in the generated JS? or is it flagged, where it should not? what is the actual behavior, and how is this different from what you expect?

@mhegazy mhegazy closed this as completed Feb 29, 2016
@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Feb 29, 2016
@unional
Copy link
Contributor Author

unional commented Feb 29, 2016

It is flagged by tslint through language service as a warning:
image
image

The warning is gone when shorthand is not used:
image

@RyanCavanaugh
Copy link
Member

@unional Please log TSLint bugs on the TSLint issue tracker

@RyanCavanaugh RyanCavanaugh added External Relates to another program, environment, or user action which we cannot control. and removed Needs More Info The issue still hasn't been fully clarified labels Feb 29, 2016
@unional
Copy link
Contributor Author

unional commented Feb 29, 2016

Ok. Thanks. Just about to do so

@unional
Copy link
Contributor Author

unional commented Feb 29, 2016

But could this be related to #3688?

I'll go around TSLint first. Issue created:
palantir/tslint#1005

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
External Relates to another program, environment, or user action which we cannot control.
Projects
None yet
Development

No branches or pull requests

3 participants