@@ -184,3 +184,48 @@ a3 = a2;
184184>a3 : Symbol(a3, Decl(tupleTypes.ts, 45, 3))
185185>a2 : Symbol(a2, Decl(tupleTypes.ts, 44, 3))
186186
187+ type B = Pick<[number], 'length'>;
188+ >B : Symbol(B, Decl(tupleTypes.ts, 52, 8))
189+ >Pick : Symbol(Pick, Decl(lib.es5.d.ts, --, --))
190+
191+ declare const b: B;
192+ >b : Symbol(b, Decl(tupleTypes.ts, 55, 13))
193+ >B : Symbol(B, Decl(tupleTypes.ts, 52, 8))
194+
195+ b.length = 0; // Error
196+ >b.length : Symbol(length)
197+ >b : Symbol(b, Decl(tupleTypes.ts, 55, 13))
198+ >length : Symbol(length)
199+
200+ declare const b1: readonly [number?];
201+ >b1 : Symbol(b1, Decl(tupleTypes.ts, 57, 13))
202+
203+ b1.length = 0; // Error
204+ >b1.length : Symbol(length)
205+ >b1 : Symbol(b1, Decl(tupleTypes.ts, 57, 13))
206+ >length : Symbol(length)
207+
208+ declare const b2: readonly [number, ...number[]];
209+ >b2 : Symbol(b2, Decl(tupleTypes.ts, 59, 13))
210+
211+ b2.length = 0; // Error
212+ >b2.length : Symbol(length)
213+ >b2 : Symbol(b2, Decl(tupleTypes.ts, 59, 13))
214+ >length : Symbol(length)
215+
216+ declare const b3: readonly number[];
217+ >b3 : Symbol(b3, Decl(tupleTypes.ts, 61, 13))
218+
219+ b3.length = 0; // Error
220+ >b3.length : Symbol(ReadonlyArray.length, Decl(lib.es5.d.ts, --, --))
221+ >b3 : Symbol(b3, Decl(tupleTypes.ts, 61, 13))
222+ >length : Symbol(ReadonlyArray.length, Decl(lib.es5.d.ts, --, --))
223+
224+ declare const b4: [number?];
225+ >b4 : Symbol(b4, Decl(tupleTypes.ts, 63, 13))
226+
227+ b4.length = 0;
228+ >b4.length : Symbol(length)
229+ >b4 : Symbol(b4, Decl(tupleTypes.ts, 63, 13))
230+ >length : Symbol(length)
231+
0 commit comments