mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-28 02:45:51 -05:00
Modifying test
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// None of these declarations should have any errors!
|
||||
// Using typeof directly, these should be any
|
||||
// The following are errors because of circular references
|
||||
var c: typeof c;
|
||||
var c: any;
|
||||
var d: typeof e;
|
||||
@@ -7,7 +6,6 @@ var d: any;
|
||||
var e: typeof d;
|
||||
var e: any;
|
||||
|
||||
// In type arguments, these should be any
|
||||
interface Foo<T> { }
|
||||
var f: Array<typeof f>;
|
||||
var f: any;
|
||||
@@ -16,6 +14,7 @@ var f2: any;
|
||||
var f3: Foo<typeof f3>[];
|
||||
var f3: any;
|
||||
|
||||
// None of these declarations should have any errors!
|
||||
// Truly recursive types
|
||||
var g: { x: typeof g; };
|
||||
var g: typeof g.x;
|
||||
@@ -48,6 +47,6 @@ var hy2 = hy2.x[0];
|
||||
|
||||
interface Foo2<T, U> { }
|
||||
|
||||
// This one should be any because the first type argument is not contained inside a type literal
|
||||
// This one should be an error because the first type argument is not contained inside a type literal
|
||||
var hy3: Foo2<typeof hy3, { x: typeof hy3 }>;
|
||||
var hy3: any;
|
||||
Reference in New Issue
Block a user