TypeScript/tests/baselines/reference/classDoesNotDependOnBaseTypes.types
2015-04-16 18:15:03 -07:00

44 lines
1.2 KiB
Plaintext

=== tests/cases/conformance/types/typeAliases/classDoesNotDependOnBaseTypes.ts ===
var x: StringTree;
>x : string | StringTreeCollection
>StringTree : string | StringTreeCollection
if (typeof x !== "string") {
>typeof x !== "string" : boolean
>typeof x : string
>x : string | StringTreeCollection
>"string" : string
x[0] = "";
>x[0] = "" : string
>x[0] : string | StringTreeCollection
>x : StringTreeCollection
>0 : number
>"" : string
x[0] = new StringTreeCollection;
>x[0] = new StringTreeCollection : StringTreeCollection
>x[0] : string | StringTreeCollection
>x : StringTreeCollection
>0 : number
>new StringTreeCollection : StringTreeCollection
>StringTreeCollection : typeof StringTreeCollection
}
type StringTree = string | StringTreeCollection;
>StringTree : string | StringTreeCollection
>StringTreeCollection : StringTreeCollection
class StringTreeCollectionBase {
>StringTreeCollectionBase : StringTreeCollectionBase
[n: number]: StringTree;
>n : number
>StringTree : string | StringTreeCollection
}
class StringTreeCollection extends StringTreeCollectionBase { }
>StringTreeCollection : StringTreeCollection
>StringTreeCollectionBase : StringTreeCollectionBase