|
| 1 | +tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts(10,9): error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'Style'. |
| 2 | + Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'StyleArray'. |
| 3 | + Types of property 'pop' are incompatible. |
| 4 | + Type '() => { foo: string; jj: number; }[][]' is not assignable to type '() => Style'. |
| 5 | + Type '{ foo: string; jj: number; }[][]' is not assignable to type 'Style'. |
| 6 | + Type '{ foo: string; jj: number; }[][]' is not assignable to type 'StyleArray'. |
| 7 | + Types of property 'pop' are incompatible. |
| 8 | + Type '() => { foo: string; jj: number; }[]' is not assignable to type '() => Style'. |
| 9 | + Type '{ foo: string; jj: number; }[]' is not assignable to type 'Style'. |
| 10 | + Type '{ foo: string; jj: number; }[]' is not assignable to type 'StyleArray'. |
| 11 | + Types of property 'pop' are incompatible. |
| 12 | + Type '() => { foo: string; jj: number; }' is not assignable to type '() => Style'. |
| 13 | + Type '{ foo: string; jj: number; }' is not assignable to type 'Style'. |
| 14 | + Object literal may only specify known properties, and 'jj' does not exist in type 'Style'. |
| 15 | + |
| 16 | + |
| 17 | +==== tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts (1 errors) ==== |
| 18 | + type Style = StyleBase | StyleArray; |
| 19 | + interface StyleArray extends Array<Style> {} |
| 20 | + interface StyleBase { |
| 21 | + foo: string; |
| 22 | + } |
| 23 | + |
| 24 | + const blah: Style = [ |
| 25 | + [[{ |
| 26 | + foo: 'asdf', |
| 27 | + jj: 1 // intentional error |
| 28 | + ~~~~~ |
| 29 | +!!! error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'Style'. |
| 30 | +!!! error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'StyleArray'. |
| 31 | +!!! error TS2322: Types of property 'pop' are incompatible. |
| 32 | +!!! error TS2322: Type '() => { foo: string; jj: number; }[][]' is not assignable to type '() => Style'. |
| 33 | +!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'Style'. |
| 34 | +!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'StyleArray'. |
| 35 | +!!! error TS2322: Types of property 'pop' are incompatible. |
| 36 | +!!! error TS2322: Type '() => { foo: string; jj: number; }[]' is not assignable to type '() => Style'. |
| 37 | +!!! error TS2322: Type '{ foo: string; jj: number; }[]' is not assignable to type 'Style'. |
| 38 | +!!! error TS2322: Type '{ foo: string; jj: number; }[]' is not assignable to type 'StyleArray'. |
| 39 | +!!! error TS2322: Types of property 'pop' are incompatible. |
| 40 | +!!! error TS2322: Type '() => { foo: string; jj: number; }' is not assignable to type '() => Style'. |
| 41 | +!!! error TS2322: Type '{ foo: string; jj: number; }' is not assignable to type 'Style'. |
| 42 | +!!! error TS2322: Object literal may only specify known properties, and 'jj' does not exist in type 'Style'. |
| 43 | + }]] |
| 44 | + ]; |
| 45 | + |
| 46 | + |
0 commit comments