File tree Expand file tree Collapse file tree 6 files changed +9
-17
lines changed
tests/baselines/reference/api Expand file tree Collapse file tree 6 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -653,7 +653,7 @@ namespace ts.server {
653653
654654 return response . body ! . map ( item => ( { // TODO: GH#18217
655655 ...item ,
656- kind : item . kind as InlayHintKind | undefined ,
656+ kind : item . kind as InlayHintKind ,
657657 position : this . lineOffsetToPosition ( file , item . position ) ,
658658 } ) ) ;
659659 }
Original file line number Diff line number Diff line change @@ -2562,11 +2562,7 @@ namespace ts.server.protocol {
25622562 body ?: SignatureHelpItems ;
25632563 }
25642564
2565- export const enum InlayHintKind {
2566- Type = "Type" ,
2567- Parameter = "Parameter" ,
2568- Enum = "Enum" ,
2569- }
2565+ export type InlayHintKind = "Type" | "Parameter" | "Enum" ;
25702566
25712567 export interface InlayHintsRequestArgs extends FileRequestArgs {
25722568 /**
@@ -2587,7 +2583,7 @@ namespace ts.server.protocol {
25872583 export interface InlayHintItem {
25882584 text : string ;
25892585 position : Location ;
2590- kind ? : InlayHintKind ;
2586+ kind : InlayHintKind ;
25912587 whitespaceBefore ?: boolean ;
25922588 whitespaceAfter ?: boolean ;
25932589 }
Original file line number Diff line number Diff line change @@ -1452,7 +1452,7 @@ namespace ts.server {
14521452 } ) ;
14531453 }
14541454
1455- private provideInlayHints ( args : protocol . InlayHintsRequestArgs ) {
1455+ private provideInlayHints ( args : protocol . InlayHintsRequestArgs ) : readonly protocol . InlayHintItem [ ] {
14561456 const { file, project } = this . getFileAndProject ( args ) ;
14571457 const scriptInfo = this . projectService . getScriptInfoForNormalizedPath ( file ) ! ;
14581458 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 {
720720 export interface InlayHint {
721721 text : string ;
722722 position : number ;
723- kind ? : InlayHintKind ;
723+ kind : InlayHintKind ;
724724 whitespaceBefore ?: boolean ;
725725 whitespaceAfter ?: boolean ;
726726 }
Original file line number Diff line number Diff line change @@ -5886,7 +5886,7 @@ declare namespace ts {
58865886 interface InlayHint {
58875887 text: string;
58885888 position: number;
5889- kind? : InlayHintKind;
5889+ kind: InlayHintKind;
58905890 whitespaceBefore?: boolean;
58915891 whitespaceAfter?: boolean;
58925892 }
@@ -8739,11 +8739,7 @@ declare namespace ts.server.protocol {
87398739 interface SignatureHelpResponse extends Response {
87408740 body?: SignatureHelpItems;
87418741 }
8742- enum InlayHintKind {
8743- Type = "Type",
8744- Parameter = "Parameter",
8745- Enum = "Enum"
8746- }
8742+ type InlayHintKind = "Type" | "Parameter" | "Enum";
87478743 interface InlayHintsRequestArgs extends FileRequestArgs {
87488744 /**
87498745 * Start position of the span.
@@ -8761,7 +8757,7 @@ declare namespace ts.server.protocol {
87618757 interface InlayHintItem {
87628758 text: string;
87638759 position: Location;
8764- kind? : InlayHintKind;
8760+ kind: InlayHintKind;
87658761 whitespaceBefore?: boolean;
87668762 whitespaceAfter?: boolean;
87678763 }
Original file line number Diff line number Diff line change @@ -5886,7 +5886,7 @@ declare namespace ts {
58865886 interface InlayHint {
58875887 text : string ;
58885888 position : number ;
5889- kind ? : InlayHintKind ;
5889+ kind : InlayHintKind ;
58905890 whitespaceBefore ?: boolean ;
58915891 whitespaceAfter ?: boolean ;
58925892 }
You can’t perform that action at this time.
0 commit comments