|
1 | 1 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(4,6): error TS2456: Type alias 'T0' circularly references itself.
|
| 2 | +tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(5,6): error TS2456: Type alias 'T0_1' circularly references itself. |
2 | 3 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(6,6): error TS2456: Type alias 'T0_2' circularly references itself.
|
| 4 | +tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(7,6): error TS2456: Type alias 'T0_3' circularly references itself. |
3 | 5 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(11,6): error TS2456: Type alias 'T1' circularly references itself.
|
4 | 6 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(14,6): error TS2456: Type alias 'T2' circularly references itself.
|
5 | 7 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(16,6): error TS2456: Type alias 'T2_1' circularly references itself.
|
6 | 8 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(19,6): error TS2456: Type alias 'T3' circularly references itself.
|
7 | 9 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(22,6): error TS2456: Type alias 'T4' circularly references itself.
|
| 10 | +tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(25,5): error TS2502: 'x' is referenced directly or indirectly in its own type annotation. |
8 | 11 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(26,6): error TS2456: Type alias 'T5' circularly references itself.
|
| 12 | +tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(29,6): error TS2456: Type alias 'T6' circularly references itself. |
9 | 13 | tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(30,6): error TS2456: Type alias 'T7' circularly references itself.
|
| 14 | +tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(31,5): error TS2502: 'yy' is referenced directly or indirectly in its own type annotation. |
| 15 | +tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(32,6): error TS2456: Type alias 'T8' circularly references itself. |
10 | 16 |
|
11 | 17 |
|
12 |
| -==== tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts (9 errors) ==== |
| 18 | +==== tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts (15 errors) ==== |
13 | 19 | // It is an error for the type specified in a type alias to depend on that type alias
|
14 | 20 |
|
15 | 21 | // A type alias directly depends on the type it aliases.
|
16 | 22 | type T0 = T0
|
17 | 23 | ~~
|
18 | 24 | !!! error TS2456: Type alias 'T0' circularly references itself.
|
19 | 25 | type T0_1 = T0_2
|
| 26 | + ~~~~ |
| 27 | +!!! error TS2456: Type alias 'T0_1' circularly references itself. |
20 | 28 | type T0_2 = T0_3
|
21 | 29 | ~~~~
|
22 | 30 | !!! error TS2456: Type alias 'T0_2' circularly references itself.
|
23 | 31 | type T0_3 = T0_1
|
| 32 | + ~~~~ |
| 33 | +!!! error TS2456: Type alias 'T0_3' circularly references itself. |
24 | 34 |
|
25 | 35 | // A type reference directly depends on the referenced type and each of the type arguments, if any.
|
26 | 36 | interface I<T> {}
|
@@ -49,17 +59,25 @@ tests/cases/conformance/types/typeAliases/directDependenceBetweenTypeAliases.ts(
|
49 | 59 |
|
50 | 60 | // A type query directly depends on the type of the referenced entity.
|
51 | 61 | var x: T5[] = []
|
| 62 | + ~ |
| 63 | +!!! error TS2502: 'x' is referenced directly or indirectly in its own type annotation. |
52 | 64 | type T5 = typeof x
|
53 | 65 | ~~
|
54 | 66 | !!! error TS2456: Type alias 'T5' circularly references itself.
|
55 | 67 |
|
56 | 68 | class C1<T> {}
|
57 | 69 | type T6 = T7 | number
|
| 70 | + ~~ |
| 71 | +!!! error TS2456: Type alias 'T6' circularly references itself. |
58 | 72 | type T7 = typeof yy
|
59 | 73 | ~~
|
60 | 74 | !!! error TS2456: Type alias 'T7' circularly references itself.
|
61 | 75 | var yy: [string, T8[]];
|
| 76 | + ~~ |
| 77 | +!!! error TS2502: 'yy' is referenced directly or indirectly in its own type annotation. |
62 | 78 | type T8 = C<T6>
|
| 79 | + ~~ |
| 80 | +!!! error TS2456: Type alias 'T8' circularly references itself. |
63 | 81 |
|
64 | 82 | // legal cases
|
65 | 83 | type T9 = () => T9
|
|
0 commit comments