-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript Version: 2.1.5 and latest 2.2.0
Code
@f
class A {
private b;
c() {
}
}
export function f(ctor) {
new ctor().c();
}with tsconfig.json:
{
"compilerOptions": {
"noUnusedLocals": true,
"target": "es6",
"module": "commonjs",
"experimentalDecorators": true
}
}Expected behavior:
A.b should be flagged as unused, but A should not be flagged as unused, because the decorator could be doing something useful with the class. This is a common pattern in our codebase.
Actual behavior:
A is flagged as unused
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created