28 lines
No EOL
1.8 KiB
Text
28 lines
No EOL
1.8 KiB
Text
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(1,6): error TS2456: Type alias 'typeAlias1' circularly references itself.
|
|
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(2,5): error TS2502: 'varOfAliasedType1' is referenced directly or indirectly in its own type annotation.
|
|
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(4,5): error TS2502: 'varOfAliasedType2' is referenced directly or indirectly in its own type annotation.
|
|
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(5,6): error TS2456: Type alias 'typeAlias2' circularly references itself.
|
|
tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts(9,6): error TS2456: Type alias 'typeAlias3' circularly references itself.
|
|
|
|
|
|
==== tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts (5 errors) ====
|
|
type typeAlias1 = typeof varOfAliasedType1;
|
|
~~~~~~~~~~
|
|
!!! error TS2456: Type alias 'typeAlias1' circularly references itself.
|
|
var varOfAliasedType1: typeAlias1;
|
|
~~~~~~~~~~~~~~~~~
|
|
!!! error TS2502: 'varOfAliasedType1' is referenced directly or indirectly in its own type annotation.
|
|
|
|
var varOfAliasedType2: typeAlias2;
|
|
~~~~~~~~~~~~~~~~~
|
|
!!! error TS2502: 'varOfAliasedType2' is referenced directly or indirectly in its own type annotation.
|
|
type typeAlias2 = typeof varOfAliasedType2;
|
|
~~~~~~~~~~
|
|
!!! error TS2456: Type alias 'typeAlias2' circularly references itself.
|
|
|
|
function func(): typeAlias3 { return null; }
|
|
var varOfAliasedType3 = func();
|
|
type typeAlias3 = typeof varOfAliasedType3;
|
|
~~~~~~~~~~
|
|
!!! error TS2456: Type alias 'typeAlias3' circularly references itself.
|
|
|