File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /// <reference path='fourslash.ts'/>
2+
3+ // @isolatedDeclarations : true
4+ // @declaration : true
5+
6+ //// export function f() {
7+ //// const o = /** before */ { /* inline post-{ */ // end line post-{
8+ //// // document first type
9+ //// /* inline before */ x /* inline pre-colon */ : /* inline pre-type */ 5 /* inline post-type */ , // after comma1
10+ //// // document second type
11+ //// /** 2 before */ y : 'str' /** 2 after */, //after comma2
12+ //// // pre-closing
13+ //// } /** after */;
14+ //// return o;
15+ //// }
16+
17+ verify . codeFix ( {
18+ description : `Add return type '{ /* inline post-{ */ // end line post-{
19+ x: number; // after comma1
20+ y: string; }'` ,
21+ index : 0 ,
22+ newFileContent :
23+ `export function f(): {
24+ x: number;
25+ y: string;
26+ } {
27+ const o = /** before */ { /* inline post-{ */ // end line post-{
28+ // document first type
29+ /* inline before */ x /* inline pre-colon */ : /* inline pre-type */ 5 /* inline post-type */ , // after comma1
30+ // document second type
31+ /** 2 before */ y : 'str' /** 2 after */, //after comma2
32+ // pre-closing
33+ } /** after */;
34+ return o;
35+ }` ,
36+ } ) ;
37+
38+
You can’t perform that action at this time.
0 commit comments