File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
test/query-tests/Declarations/DeadStoreOfLocal Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3636 exists ( v .getAnAccess ( ) ) and
3737 // don't flag ambient variable definitions
3838 not dead .( ASTNode ) .isAmbient ( ) and
39+ // don't flag variables with ambient uses
40+ not exists ( LexicalAccess access |
41+ access .getALexicalName ( ) = v .getADeclaration ( ) .getALexicalName ( ) and
42+ access .isAmbient ( )
43+ ) and
3944 // don't flag function expressions
4045 not exists ( FunctionExpr fe | dead = fe .getId ( ) ) and
4146 // don't flag function declarations nested inside blocks or other compound statements;
Original file line number Diff line number Diff line change 1- | computedInterfaceProperty.ts:1:10:1:12 | Foo | This definition of Foo is useless, since its value is never read. |
2- | computedInterfaceProperty.ts:7:7:7:17 | Bar = "Bar" | The initial value of Bar is unused, since it is always overwritten. |
3- | computedInterfaceProperty.ts:13:7:13:17 | Baz = "Baz" | The initial value of Baz is unused, since it is always overwritten. |
4- | computedInterfaceProperty.ts:21:1:21:10 | class C {} | This definition of C is useless, since its value is never read. |
51| overload.ts:10:12:10:14 | baz | This definition of baz is useless, since its value is never read. |
62| tst2.js:26:9:26:14 | x = 23 | The initial value of x is unused, since it is always overwritten. |
73| tst2.js:28:9:28:14 | x = 42 | This definition of x is useless, since its value is never read. |
You can’t perform that action at this time.
0 commit comments