@@ -310,3 +310,86 @@ const obj2: { [x: string]: number } | { a: number } = { a: 5, c: 'abc' }; // Er
310310>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 113, 55))
311311>c : Symbol(c, Decl(excessPropertyCheckWithUnions.ts, 113, 61))
312312
313+ // Repro from #33732
314+
315+ interface I1 {
316+ >I1 : Symbol(I1, Decl(excessPropertyCheckWithUnions.ts, 113, 73))
317+
318+ prop1: string;
319+ >prop1 : Symbol(I1.prop1, Decl(excessPropertyCheckWithUnions.ts, 117, 14))
320+ }
321+
322+ interface I2 {
323+ >I2 : Symbol(I2, Decl(excessPropertyCheckWithUnions.ts, 119, 1))
324+
325+ prop2: string;
326+ >prop2 : Symbol(I2.prop2, Decl(excessPropertyCheckWithUnions.ts, 121, 14))
327+ }
328+
329+ interface I3 extends Record<string, string> {
330+ >I3 : Symbol(I3, Decl(excessPropertyCheckWithUnions.ts, 123, 1))
331+ >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
332+
333+ }
334+
335+ type Properties =
336+ >Properties : Symbol(Properties, Decl(excessPropertyCheckWithUnions.ts, 127, 1))
337+
338+ | { [key: string]: never }
339+ >key : Symbol(key, Decl(excessPropertyCheckWithUnions.ts, 130, 9))
340+
341+ | I1
342+ >I1 : Symbol(I1, Decl(excessPropertyCheckWithUnions.ts, 113, 73))
343+
344+ | I2
345+ >I2 : Symbol(I2, Decl(excessPropertyCheckWithUnions.ts, 119, 1))
346+
347+ | I3
348+ >I3 : Symbol(I3, Decl(excessPropertyCheckWithUnions.ts, 123, 1))
349+
350+ ;
351+
352+
353+ declare const prop1: string;
354+ >prop1 : Symbol(prop1, Decl(excessPropertyCheckWithUnions.ts, 137, 13))
355+
356+ declare const prop2: string | undefined;
357+ >prop2 : Symbol(prop2, Decl(excessPropertyCheckWithUnions.ts, 138, 13))
358+
359+ function F1(_arg: { props: Properties }) { }
360+ >F1 : Symbol(F1, Decl(excessPropertyCheckWithUnions.ts, 138, 40))
361+ >_arg : Symbol(_arg, Decl(excessPropertyCheckWithUnions.ts, 140, 12))
362+ >props : Symbol(props, Decl(excessPropertyCheckWithUnions.ts, 140, 19))
363+ >Properties : Symbol(Properties, Decl(excessPropertyCheckWithUnions.ts, 127, 1))
364+
365+ F1({
366+ >F1 : Symbol(F1, Decl(excessPropertyCheckWithUnions.ts, 138, 40))
367+
368+ props: {
369+ >props : Symbol(props, Decl(excessPropertyCheckWithUnions.ts, 141, 4))
370+
371+ prop1,
372+ >prop1 : Symbol(prop1, Decl(excessPropertyCheckWithUnions.ts, 142, 12))
373+
374+ prop2,
375+ >prop2 : Symbol(prop2, Decl(excessPropertyCheckWithUnions.ts, 143, 14))
376+
377+ },
378+ });
379+
380+ function F2(_props: Properties) { }
381+ >F2 : Symbol(F2, Decl(excessPropertyCheckWithUnions.ts, 146, 3))
382+ >_props : Symbol(_props, Decl(excessPropertyCheckWithUnions.ts, 148, 12))
383+ >Properties : Symbol(Properties, Decl(excessPropertyCheckWithUnions.ts, 127, 1))
384+
385+ F2({
386+ >F2 : Symbol(F2, Decl(excessPropertyCheckWithUnions.ts, 146, 3))
387+
388+ prop1,
389+ >prop1 : Symbol(prop1, Decl(excessPropertyCheckWithUnions.ts, 149, 4))
390+
391+ prop2,
392+ >prop2 : Symbol(prop2, Decl(excessPropertyCheckWithUnions.ts, 150, 10))
393+
394+ });
395+
0 commit comments