@@ -254,3 +254,87 @@ const obj: Union = {
254254
255255};
256256
257+
258+ // Repro from #33732
259+
260+ interface I1 {
261+ >I1 : Symbol(I1, Decl(excessPropertyCheckWithUnions.ts, 87, 2))
262+
263+ prop1: string;
264+ >prop1 : Symbol(I1.prop1, Decl(excessPropertyCheckWithUnions.ts, 92, 14))
265+ }
266+
267+ interface I2 {
268+ >I2 : Symbol(I2, Decl(excessPropertyCheckWithUnions.ts, 94, 1))
269+
270+ prop2: string;
271+ >prop2 : Symbol(I2.prop2, Decl(excessPropertyCheckWithUnions.ts, 96, 14))
272+ }
273+
274+ interface I3 extends Record<string, string> {
275+ >I3 : Symbol(I3, Decl(excessPropertyCheckWithUnions.ts, 98, 1))
276+ >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
277+
278+ }
279+
280+ type Properties =
281+ >Properties : Symbol(Properties, Decl(excessPropertyCheckWithUnions.ts, 102, 1))
282+
283+ | { [key: string]: never }
284+ >key : Symbol(key, Decl(excessPropertyCheckWithUnions.ts, 105, 9))
285+
286+ | I1
287+ >I1 : Symbol(I1, Decl(excessPropertyCheckWithUnions.ts, 87, 2))
288+
289+ | I2
290+ >I2 : Symbol(I2, Decl(excessPropertyCheckWithUnions.ts, 94, 1))
291+
292+ | I3
293+ >I3 : Symbol(I3, Decl(excessPropertyCheckWithUnions.ts, 98, 1))
294+
295+ ;
296+
297+
298+ declare const prop1: string;
299+ >prop1 : Symbol(prop1, Decl(excessPropertyCheckWithUnions.ts, 112, 13))
300+
301+ declare const prop2: string | undefined;
302+ >prop2 : Symbol(prop2, Decl(excessPropertyCheckWithUnions.ts, 113, 13))
303+
304+ function F1(_arg: { props: Properties }) { }
305+ >F1 : Symbol(F1, Decl(excessPropertyCheckWithUnions.ts, 113, 40))
306+ >_arg : Symbol(_arg, Decl(excessPropertyCheckWithUnions.ts, 115, 12))
307+ >props : Symbol(props, Decl(excessPropertyCheckWithUnions.ts, 115, 19))
308+ >Properties : Symbol(Properties, Decl(excessPropertyCheckWithUnions.ts, 102, 1))
309+
310+ F1({
311+ >F1 : Symbol(F1, Decl(excessPropertyCheckWithUnions.ts, 113, 40))
312+
313+ props: {
314+ >props : Symbol(props, Decl(excessPropertyCheckWithUnions.ts, 116, 4))
315+
316+ prop1,
317+ >prop1 : Symbol(prop1, Decl(excessPropertyCheckWithUnions.ts, 117, 12))
318+
319+ prop2,
320+ >prop2 : Symbol(prop2, Decl(excessPropertyCheckWithUnions.ts, 118, 14))
321+
322+ },
323+ });
324+
325+ function F2(_props: Properties) { }
326+ >F2 : Symbol(F2, Decl(excessPropertyCheckWithUnions.ts, 121, 3))
327+ >_props : Symbol(_props, Decl(excessPropertyCheckWithUnions.ts, 123, 12))
328+ >Properties : Symbol(Properties, Decl(excessPropertyCheckWithUnions.ts, 102, 1))
329+
330+ F2({
331+ >F2 : Symbol(F2, Decl(excessPropertyCheckWithUnions.ts, 121, 3))
332+
333+ prop1,
334+ >prop1 : Symbol(prop1, Decl(excessPropertyCheckWithUnions.ts, 124, 4))
335+
336+ prop2,
337+ >prop2 : Symbol(prop2, Decl(excessPropertyCheckWithUnions.ts, 125, 10))
338+
339+ });
340+
0 commit comments