File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ export function createSignatureDeclarationFromSignature(
400
400
parameterDecl . modifiers ,
401
401
parameterDecl . dotDotDotToken ,
402
402
parameterDecl . name ,
403
- parameterDecl . questionToken ,
403
+ isJs ? undefined : parameterDecl . questionToken ,
404
404
type ,
405
405
parameterDecl . initializer
406
406
) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts" />
2
+
3
+ // @allowJs : true
4
+ // @checkJs : true
5
+ // @filename : /a.js
6
+ /////**
7
+ //// * @type {{ f: (x?: string) => number } }
8
+ //// */
9
+ ////[|export const foo = {}|]
10
+
11
+ verify . codeFix ( {
12
+ index : 0 ,
13
+ description : ts . Diagnostics . Add_missing_properties . message ,
14
+ newRangeContent :
15
+ `export const foo = {
16
+ f: function(x) {
17
+ throw new Error("Function not implemented.");
18
+ }
19
+ }` ,
20
+ } ) ;
You can’t perform that action at this time.
0 commit comments