@@ -1571,15 +1571,15 @@ namespace ts.server {
1571
1571
}
1572
1572
}
1573
1573
1574
- private applyCodeActionCommand ( commandName : string , requestSeq : number , args : protocol . ApplyCodeActionCommandRequestArgs ) : void {
1574
+ private applyCodeActionCommand ( args : protocol . ApplyCodeActionCommandRequestArgs ) : { } {
1575
1575
const commands = args . command as CodeActionCommand | CodeActionCommand [ ] ; // They should be sending back the command we sent them.
1576
1576
for ( const command of toArray ( commands ) ) {
1577
1577
const { project } = this . getFileAndProject ( command ) ;
1578
- const output = ( success : boolean , message : string ) => this . doOutput ( { } , commandName , requestSeq , success , message ) ;
1579
1578
project . getLanguageService ( ) . applyCodeActionCommand ( command ) . then (
1580
- result => { output ( /* success*/ true , result . successMessage ) ; } ,
1581
- error => { output ( /*success*/ false , error ) ; } ) ;
1579
+ _result => { /* TODO: GH#20447 report success message? */ } ,
1580
+ _error => { /* TODO: GH#20447 report errors */ } ) ;
1582
1581
}
1582
+ return { } ;
1583
1583
}
1584
1584
1585
1585
private getStartAndEndPosition ( args : protocol . FileRangeRequestArgs , scriptInfo : ScriptInfo ) {
@@ -1705,17 +1705,17 @@ namespace ts.server {
1705
1705
private handlers = createMapFromTemplate < ( request : protocol . Request ) => HandlerResponse > ( {
1706
1706
[ CommandNames . OpenExternalProject ] : ( request : protocol . OpenExternalProjectRequest ) => {
1707
1707
this . projectService . openExternalProject ( request . arguments , /*suppressRefreshOfInferredProjects*/ false ) ;
1708
- // TODO: report errors
1708
+ // TODO: GH#20447 report errors
1709
1709
return this . requiredResponse ( /*response*/ true ) ;
1710
1710
} ,
1711
1711
[ CommandNames . OpenExternalProjects ] : ( request : protocol . OpenExternalProjectsRequest ) => {
1712
1712
this . projectService . openExternalProjects ( request . arguments . projects ) ;
1713
- // TODO: report errors
1713
+ // TODO: GH#20447 report errors
1714
1714
return this . requiredResponse ( /*response*/ true ) ;
1715
1715
} ,
1716
1716
[ CommandNames . CloseExternalProject ] : ( request : protocol . CloseExternalProjectRequest ) => {
1717
1717
this . projectService . closeExternalProject ( request . arguments . projectFileName ) ;
1718
- // TODO: report errors
1718
+ // TODO: GH#20447 report errors
1719
1719
return this . requiredResponse ( /*response*/ true ) ;
1720
1720
} ,
1721
1721
[ CommandNames . SynchronizeProjectList ] : ( request : protocol . SynchronizeProjectListRequest ) => {
@@ -1957,8 +1957,7 @@ namespace ts.server {
1957
1957
return this . requiredResponse ( this . getCodeFixes ( request . arguments , /*simplifiedResult*/ false ) ) ;
1958
1958
} ,
1959
1959
[ CommandNames . ApplyCodeActionCommand ] : ( request : protocol . ApplyCodeActionCommandRequest ) => {
1960
- this . applyCodeActionCommand ( request . command , request . seq , request . arguments ) ;
1961
- return this . notRequired ( ) ; // Response will come asynchronously.
1960
+ return this . requiredResponse ( this . applyCodeActionCommand ( request . arguments ) ) ;
1962
1961
} ,
1963
1962
[ CommandNames . GetSupportedCodeFixes ] : ( ) => {
1964
1963
return this . requiredResponse ( this . getSupportedCodeFixes ( ) ) ;
0 commit comments