@@ -22,6 +22,119 @@ type Example = {
2222================================================================================
2323` ;
2424
25+ exports [` issue-11098.ts format 1` ] = `
26+ ====================================options=====================================
27+ parsers: ["typescript"]
28+ printWidth: 80
29+ | printWidth
30+ =====================================input======================================
31+ type Type = {
32+ // comment
33+ readonly [T in number ];
34+ } ;
35+
36+ type Type = {
37+ // comment1
38+ // comment2
39+ readonly [T in number ];
40+ } ;
41+
42+ type Type = {
43+ // comment
44+ + readonly [T in number ];
45+ } ;
46+
47+ type Type = {
48+ // comment
49+ - readonly [T in number ];
50+ } ;
51+
52+ type Type = {
53+ // comment
54+ + readonly [T in number ];
55+ } ;
56+
57+ type Type = {
58+ // comment
59+ + readonly [T in number ];
60+ } ;
61+
62+ type Type = {
63+ // comment
64+ readonly [T in number ];
65+ } ;
66+
67+ type Type = {
68+ // comment
69+ [T in number ];
70+ } ;
71+
72+ type Type = {
73+ readonly
74+ // comment
75+ [T in number ];
76+ } ;
77+
78+ type Type = {
79+ readonly // foo
80+ /* bar */ [T in number ];
81+ } ;
82+
83+ =====================================output=====================================
84+ type Type = {
85+ // comment
86+ readonly [T in number ];
87+ } ;
88+
89+ type Type = {
90+ // comment1
91+ // comment2
92+ readonly [T in number ];
93+ } ;
94+
95+ type Type = {
96+ // comment
97+ + readonly [T in number ];
98+ } ;
99+
100+ type Type = {
101+ // comment
102+ - readonly [T in number ];
103+ } ;
104+
105+ type Type = {
106+ // comment
107+ + readonly [T in number ];
108+ } ;
109+
110+ type Type = {
111+ // comment
112+ + readonly [T in number ];
113+ } ;
114+
115+ type Type = {
116+ // comment
117+ readonly [T in number ];
118+ } ;
119+
120+ type Type = {
121+ // comment
122+ [T in number ];
123+ } ;
124+
125+ type Type = {
126+ // comment
127+ readonly [T in number ];
128+ } ;
129+
130+ type Type = {
131+ // foo
132+ /* bar */ readonly [T in number ];
133+ } ;
134+
135+ ================================================================================
136+ ` ;
137+
25138exports [` mapped-type.ts format 1` ] = `
26139====================================options=====================================
27140parsers: ["typescript"]
0 commit comments