File tree 8 files changed +18
-1
lines changed
tests/baselines/reference/api
8 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -741,5 +741,9 @@ namespace ts.server {
741
741
dispose ( ) : void {
742
742
throw new Error ( "dispose is not available through the server layer." ) ;
743
743
}
744
+
745
+ getSupportedCodeFixes ( ) {
746
+ return getSupportedCodeFixes ( ) ;
747
+ }
744
748
}
745
749
}
Original file line number Diff line number Diff line change @@ -578,6 +578,9 @@ namespace Harness.LanguageService {
578
578
return ts . notImplemented ( ) ;
579
579
}
580
580
dispose ( ) : void { this . shim . dispose ( { } ) ; }
581
+ getSupportedCodeFixes ( ) : ReadonlyArray < string > {
582
+ throw new Error ( "Not supported on the shim." ) ;
583
+ }
581
584
}
582
585
583
586
export class ShimLanguageServiceAdapter implements LanguageServiceAdapter {
Original file line number Diff line number Diff line change @@ -748,6 +748,7 @@ namespace ts.server.protocol {
748
748
*/
749
749
export interface GetSupportedCodeFixesRequest extends Request {
750
750
command : CommandTypes . GetSupportedCodeFixes ;
751
+ arguments ?: Partial < FileRequestArgs > ;
751
752
}
752
753
753
754
/**
Original file line number Diff line number Diff line change @@ -1803,7 +1803,11 @@ namespace ts.server {
1803
1803
}
1804
1804
}
1805
1805
1806
- private getSupportedCodeFixes ( ) : string [ ] {
1806
+ private getSupportedCodeFixes ( args ?: protocol . FileRequestArgs ) : ReadonlyArray < string > {
1807
+ if ( args && args . file ) {
1808
+ const { project} = this . getFileAndProject ( args ) ;
1809
+ return project . getLanguageService ( /*ensureSynchronized*/ false ) . getSupportedCodeFixes ( ) ;
1810
+ }
1807
1811
return getSupportedCodeFixes ( ) ;
1808
1812
}
1809
1813
Original file line number Diff line number Diff line change @@ -2143,6 +2143,7 @@ namespace ts {
2143
2143
getEditsForRefactor,
2144
2144
toLineColumnOffset : sourceMapper . toLineColumnOffset ,
2145
2145
getSourceMapper : ( ) => sourceMapper ,
2146
+ getSupportedCodeFixes,
2146
2147
} ;
2147
2148
}
2148
2149
Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ namespace ts {
356
356
/* @internal */ getNonBoundSourceFile ( fileName : string ) : SourceFile ;
357
357
358
358
dispose ( ) : void ;
359
+ getSupportedCodeFixes ( ) : ReadonlyArray < string > ;
359
360
}
360
361
361
362
export interface JsxClosingTagInfo {
Original file line number Diff line number Diff line change @@ -4754,6 +4754,7 @@ declare namespace ts {
4754
4754
getEmitOutput ( fileName : string , emitOnlyDtsFiles ?: boolean ) : EmitOutput ;
4755
4755
getProgram ( ) : Program | undefined ;
4756
4756
dispose ( ) : void ;
4757
+ getSupportedCodeFixes ( ) : ReadonlyArray < string > ;
4757
4758
}
4758
4759
interface JsxClosingTagInfo {
4759
4760
readonly newText : string ;
@@ -6199,6 +6200,7 @@ declare namespace ts.server.protocol {
6199
6200
*/
6200
6201
interface GetSupportedCodeFixesRequest extends Request {
6201
6202
command : CommandTypes . GetSupportedCodeFixes ;
6203
+ arguments ?: Partial < FileRequestArgs > ;
6202
6204
}
6203
6205
/**
6204
6206
* A response for GetSupportedCodeFixesRequest request.
Original file line number Diff line number Diff line change @@ -4754,6 +4754,7 @@ declare namespace ts {
4754
4754
getEmitOutput ( fileName : string , emitOnlyDtsFiles ?: boolean ) : EmitOutput ;
4755
4755
getProgram ( ) : Program | undefined ;
4756
4756
dispose ( ) : void ;
4757
+ getSupportedCodeFixes ( ) : ReadonlyArray < string > ;
4757
4758
}
4758
4759
interface JsxClosingTagInfo {
4759
4760
readonly newText : string ;
You can’t perform that action at this time.
0 commit comments