File tree 6 files changed +9
-17
lines changed
tests/baselines/reference/api
6 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -653,7 +653,7 @@ namespace ts.server {
653
653
654
654
return response . body ! . map ( item => ( { // TODO: GH#18217
655
655
...item ,
656
- kind : item . kind as InlayHintKind | undefined ,
656
+ kind : item . kind as InlayHintKind ,
657
657
position : this . lineOffsetToPosition ( file , item . position ) ,
658
658
} ) ) ;
659
659
}
Original file line number Diff line number Diff line change @@ -2562,11 +2562,7 @@ namespace ts.server.protocol {
2562
2562
body ?: SignatureHelpItems ;
2563
2563
}
2564
2564
2565
- export const enum InlayHintKind {
2566
- Type = "Type" ,
2567
- Parameter = "Parameter" ,
2568
- Enum = "Enum" ,
2569
- }
2565
+ export type InlayHintKind = "Type" | "Parameter" | "Enum" ;
2570
2566
2571
2567
export interface InlayHintsRequestArgs extends FileRequestArgs {
2572
2568
/**
@@ -2587,7 +2583,7 @@ namespace ts.server.protocol {
2587
2583
export interface InlayHintItem {
2588
2584
text : string ;
2589
2585
position : Location ;
2590
- kind ? : InlayHintKind ;
2586
+ kind : InlayHintKind ;
2591
2587
whitespaceBefore ?: boolean ;
2592
2588
whitespaceAfter ?: boolean ;
2593
2589
}
Original file line number Diff line number Diff line change @@ -1452,7 +1452,7 @@ namespace ts.server {
1452
1452
} ) ;
1453
1453
}
1454
1454
1455
- private provideInlayHints ( args : protocol . InlayHintsRequestArgs ) {
1455
+ private provideInlayHints ( args : protocol . InlayHintsRequestArgs ) : readonly protocol . InlayHintItem [ ] {
1456
1456
const { file, project } = this . getFileAndProject ( args ) ;
1457
1457
const scriptInfo = this . projectService . getScriptInfoForNormalizedPath ( file ) ! ;
1458
1458
const hints = project . getLanguageService ( ) . provideInlayHints ( file , args , this . getPreferences ( file ) ) ;
Original file line number Diff line number Diff line change @@ -720,7 +720,7 @@ namespace ts {
720
720
export interface InlayHint {
721
721
text : string ;
722
722
position : number ;
723
- kind ? : InlayHintKind ;
723
+ kind : InlayHintKind ;
724
724
whitespaceBefore ?: boolean ;
725
725
whitespaceAfter ?: boolean ;
726
726
}
Original file line number Diff line number Diff line change @@ -5886,7 +5886,7 @@ declare namespace ts {
5886
5886
interface InlayHint {
5887
5887
text: string;
5888
5888
position: number;
5889
- kind? : InlayHintKind;
5889
+ kind: InlayHintKind;
5890
5890
whitespaceBefore?: boolean;
5891
5891
whitespaceAfter?: boolean;
5892
5892
}
@@ -8739,11 +8739,7 @@ declare namespace ts.server.protocol {
8739
8739
interface SignatureHelpResponse extends Response {
8740
8740
body?: SignatureHelpItems;
8741
8741
}
8742
- enum InlayHintKind {
8743
- Type = "Type",
8744
- Parameter = "Parameter",
8745
- Enum = "Enum"
8746
- }
8742
+ type InlayHintKind = "Type" | "Parameter" | "Enum";
8747
8743
interface InlayHintsRequestArgs extends FileRequestArgs {
8748
8744
/**
8749
8745
* Start position of the span.
@@ -8761,7 +8757,7 @@ declare namespace ts.server.protocol {
8761
8757
interface InlayHintItem {
8762
8758
text: string;
8763
8759
position: Location;
8764
- kind? : InlayHintKind;
8760
+ kind: InlayHintKind;
8765
8761
whitespaceBefore?: boolean;
8766
8762
whitespaceAfter?: boolean;
8767
8763
}
Original file line number Diff line number Diff line change @@ -5886,7 +5886,7 @@ declare namespace ts {
5886
5886
interface InlayHint {
5887
5887
text : string ;
5888
5888
position : number ;
5889
- kind ? : InlayHintKind ;
5889
+ kind : InlayHintKind ;
5890
5890
whitespaceBefore ?: boolean ;
5891
5891
whitespaceAfter ?: boolean ;
5892
5892
}
You can’t perform that action at this time.
0 commit comments