Conversation
mihailik
left a comment
There was a problem hiding this comment.
More tests needed, there are a few use cases where outcome is ambiguous without a test pegging to specific span.
|
|
||
| ==== tests/cases/compiler/unusedClassesinModule1.ts (1 errors) ==== | ||
| module A { | ||
| class Calculator { |
There was a problem hiding this comment.
What's going to happen for generic class?
Calculator<T>
Calculator<T where T extends K>
| ==== tests/cases/compiler/noUnusedLocals_selfReference.ts (8 errors) ==== | ||
| export {}; // Make this a module scope, so these are local variables. | ||
|
|
||
| function f() { |
There was a problem hiding this comment.
What about generic functions?
function f<T>() {
function f<T where T extends K> () {
Also what about async functions?
async function f() {
Also what about class methods?
private f() {
|
|
||
| ==== tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts (3 errors) ==== | ||
| namespace n { | ||
| function f() { |
There was a problem hiding this comment.
Comments or extensive whitespace/newlines between function and f — will those be included in the span, or break off the function part out of the span?
|
|
||
| ==== tests/cases/compiler/unusedNamespaceInNamespace.ts (1 errors) ==== | ||
| namespace A { | ||
| namespace B { } |
There was a problem hiding this comment.
Worth adding enum, var/let/const tests too.
Anything else?
Part of #22361 (comment)