|
| 1 | +=== tests/cases/compiler/excessPropertyCheckWithNestedArrayIntersection.ts === |
| 2 | +interface ValueOnlyFields { |
| 3 | +>ValueOnlyFields : Symbol(ValueOnlyFields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 0, 0)) |
| 4 | + |
| 5 | + fields: Array<{ |
| 6 | +>fields : Symbol(ValueOnlyFields.fields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 0, 27)) |
| 7 | +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) |
| 8 | + |
| 9 | + value: number | null; |
| 10 | +>value : Symbol(value, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 1, 19)) |
| 11 | + |
| 12 | + }>; |
| 13 | +} |
| 14 | +interface ValueAndKeyFields { |
| 15 | +>ValueAndKeyFields : Symbol(ValueAndKeyFields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 4, 1)) |
| 16 | + |
| 17 | + fields: Array<{ |
| 18 | +>fields : Symbol(ValueAndKeyFields.fields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 5, 29)) |
| 19 | +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) |
| 20 | + |
| 21 | + key: string | null; |
| 22 | +>key : Symbol(key, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 6, 19)) |
| 23 | + |
| 24 | + value: number | null; |
| 25 | +>value : Symbol(value, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 7, 27)) |
| 26 | + |
| 27 | + }>; |
| 28 | +} |
| 29 | +interface BugRepro { |
| 30 | +>BugRepro : Symbol(BugRepro, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 10, 1)) |
| 31 | + |
| 32 | + dataType: ValueAndKeyFields & ValueOnlyFields; |
| 33 | +>dataType : Symbol(BugRepro.dataType, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 11, 20)) |
| 34 | +>ValueAndKeyFields : Symbol(ValueAndKeyFields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 4, 1)) |
| 35 | +>ValueOnlyFields : Symbol(ValueOnlyFields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 0, 0)) |
| 36 | +} |
| 37 | +const repro: BugRepro = { |
| 38 | +>repro : Symbol(repro, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 14, 5)) |
| 39 | +>BugRepro : Symbol(BugRepro, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 10, 1)) |
| 40 | + |
| 41 | + dataType: { |
| 42 | +>dataType : Symbol(dataType, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 14, 25)) |
| 43 | + |
| 44 | + fields: [{ |
| 45 | +>fields : Symbol(fields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 15, 13)) |
| 46 | + |
| 47 | + key: 'bla', // should be OK: Not excess |
| 48 | +>key : Symbol(key, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 16, 14)) |
| 49 | + |
| 50 | + value: null, |
| 51 | +>value : Symbol(value, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 17, 17)) |
| 52 | + |
| 53 | + }], |
| 54 | + } |
| 55 | +} |
| 56 | + |
0 commit comments