36 lines
1,013 B
Text
36 lines
1,013 B
Text
=== tests/cases/conformance/types/typeAliases/interfaceDoesNotDependOnBaseTypes.ts ===
|
|
var x: StringTree;
|
|
>x : string | StringTreeArray
|
|
>StringTree : string | StringTreeArray
|
|
|
|
if (typeof x !== "string") {
|
|
>typeof x !== "string" : boolean
|
|
>typeof x : string
|
|
>x : string | StringTreeArray
|
|
>"string" : string
|
|
|
|
x.push("");
|
|
>x.push("") : number
|
|
>x.push : (...items: (string | StringTreeArray)[]) => number
|
|
>x : StringTreeArray
|
|
>push : (...items: (string | StringTreeArray)[]) => number
|
|
>"" : string
|
|
|
|
x.push([""]);
|
|
>x.push([""]) : number
|
|
>x.push : (...items: (string | StringTreeArray)[]) => number
|
|
>x : StringTreeArray
|
|
>push : (...items: (string | StringTreeArray)[]) => number
|
|
>[""] : string[]
|
|
>"" : string
|
|
}
|
|
|
|
type StringTree = string | StringTreeArray;
|
|
>StringTree : string | StringTreeArray
|
|
>StringTreeArray : StringTreeArray
|
|
|
|
interface StringTreeArray extends Array<StringTree> { }
|
|
>StringTreeArray : StringTreeArray
|
|
>Array : T[]
|
|
>StringTree : string | StringTreeArray
|
|
|