File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
tests/cases/conformance/types/specifyingTypes/typeQueries Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
- // None of these declarations should have any errors!
2
- // Using typeof directly, these should be any
1
+ // The following are errors because of circular references
3
2
var c : typeof c ;
4
3
var c : any ;
5
4
var d : typeof e ;
6
5
var d : any ;
7
6
var e : typeof d ;
8
7
var e : any ;
9
8
10
- // In type arguments, these should be any
11
9
interface Foo < T > { }
12
10
var f : Array < typeof f > ;
13
11
var f : any ;
@@ -16,6 +14,7 @@ var f2: any;
16
14
var f3 : Foo < typeof f3 > [ ] ;
17
15
var f3 : any ;
18
16
17
+ // None of these declarations should have any errors!
19
18
// Truly recursive types
20
19
var g : { x : typeof g ; } ;
21
20
var g : typeof g . x ;
@@ -48,6 +47,6 @@ var hy2 = hy2.x[0];
48
47
49
48
interface Foo2 < T , U > { }
50
49
51
- // This one should be any because the first type argument is not contained inside a type literal
50
+ // This one should be an error because the first type argument is not contained inside a type literal
52
51
var hy3 : Foo2 < typeof hy3 , { x : typeof hy3 } > ;
53
52
var hy3 : any ;
You can’t perform that action at this time.
0 commit comments