File: circularTypeofWithVarOrFunc.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 1,871 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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.