-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Increase size of span for unused declaration #22388
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts(2,14): error TS6133: 'f' is declared but its value is never read. | ||
tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts(8,22): error TS6133: 'g' is declared but its value is never read. | ||
tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts(12,22): error TS6133: 'h' is declared but its value is never read. | ||
tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts(2,5): error TS6133: 'f' is declared but its value is never read. | ||
tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts(8,13): error TS6133: 'g' is declared but its value is never read. | ||
tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts(12,13): error TS6133: 'h' is declared but its value is never read. | ||
|
||
|
||
==== tests/cases/compiler/noUnusedLocals_selfReference_skipsBlockLocations.ts (3 errors) ==== | ||
namespace n { | ||
function f() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comments or extensive whitespace/newlines between |
||
~ | ||
~~~~~~~~~~ | ||
!!! error TS6133: 'f' is declared but its value is never read. | ||
f; | ||
} | ||
|
||
switch (0) { | ||
case 0: | ||
function g() { | ||
~ | ||
~~~~~~~~~~ | ||
!!! error TS6133: 'g' is declared but its value is never read. | ||
g; | ||
} | ||
default: | ||
function h() { | ||
~ | ||
~~~~~~~~~~ | ||
!!! error TS6133: 'h' is declared but its value is never read. | ||
h; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
tests/cases/compiler/unusedClassesinModule1.ts(2,11): error TS6133: 'Calculator' is declared but its value is never read. | ||
tests/cases/compiler/unusedClassesinModule1.ts(2,5): error TS6133: 'Calculator' is declared but its value is never read. | ||
|
||
|
||
==== tests/cases/compiler/unusedClassesinModule1.ts (1 errors) ==== | ||
module A { | ||
class Calculator { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's going to happen for generic class?
|
||
~~~~~~~~~~ | ||
~~~~~~~~~~~~~~~~ | ||
!!! error TS6133: 'Calculator' is declared but its value is never read. | ||
public handelChar() { | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
tests/cases/compiler/unusedFunctionsinNamespaces1.ts(2,14): error TS6133: 'function1' is declared but its value is never read. | ||
tests/cases/compiler/unusedFunctionsinNamespaces1.ts(2,5): error TS6133: 'function1' is declared but its value is never read. | ||
|
||
|
||
==== tests/cases/compiler/unusedFunctionsinNamespaces1.ts (1 errors) ==== | ||
namespace Validation { | ||
function function1() { | ||
~~~~~~~~~ | ||
~~~~~~~~~~~~~~~~~~ | ||
!!! error TS6133: 'function1' is declared but its value is never read. | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() {