File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ namespace ts.InlayHints {
279
279
continue ;
280
280
}
281
281
282
- addTypeHints ( typeDisplayString , param . name . end ) ;
282
+ addTypeHints ( typeDisplayString , param . questionToken ? param . questionToken . end : param . name . end ) ;
283
283
}
284
284
}
285
285
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+
3
+ ////interface IFoo {
4
+ //// bar(x?: boolean): void;
5
+ //// }
6
+ ////
7
+ ////const a: IFoo = {
8
+ //// bar: function (x?/**/): void {
9
+ //// throw new Error("Function not implemented.");
10
+ //// }
11
+ //// }
12
+
13
+ const [ marker ] = test . markers ( ) ;
14
+ verify . getInlayHints ( [
15
+ {
16
+ text : ': boolean' ,
17
+ position : marker . position ,
18
+ kind : ts . InlayHintKind . Type ,
19
+ whitespaceBefore : true
20
+ } ,
21
+ ] , undefined , {
22
+ includeInlayFunctionParameterTypeHints : true
23
+ } ) ;
You can’t perform that action at this time.
0 commit comments