File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,12 @@ let resultsToDiagnostics = (
27
27
file : string ;
28
28
range : [ number , number , number , number ] ;
29
29
message : string ;
30
- annotate ?: { line : number ; character : number ; text : string } ;
30
+ annotate ?: {
31
+ line : number ;
32
+ character : number ;
33
+ text : string ;
34
+ action : string ;
35
+ } ;
31
36
}
32
37
] ,
33
38
diagnosticsResultCodeActions : DiagnosticsResultCodeActionsMap
@@ -79,13 +84,12 @@ let resultsToDiagnostics = (
79
84
// position very cheap.
80
85
if ( item . annotate != null ) {
81
86
{
82
- let codeAction = new CodeAction ( `Suppress dead code warning` ) ;
87
+ let { line, character, text, action } = item . annotate ;
88
+ let codeAction = new CodeAction ( action ) ;
83
89
codeAction . kind = CodeActionKind . RefactorRewrite ;
84
90
85
91
let codeActionEdit = new WorkspaceEdit ( ) ;
86
92
87
- let { line, character, text } = item . annotate ;
88
-
89
93
// In the future, it would be cool to have an additional code action
90
94
// here for automatically removing whatever the thing that's dead is.
91
95
codeActionEdit . replace (
You can’t perform that action at this time.
0 commit comments