16 lines
355 B
TypeScript
16 lines
355 B
TypeScript
//// [interfaceDoesNotDependOnBaseTypes.ts]
|
|
var x: StringTree;
|
|
if (typeof x !== "string") {
|
|
x.push("");
|
|
x.push([""]);
|
|
}
|
|
|
|
type StringTree = string | StringTreeArray;
|
|
interface StringTreeArray extends Array<StringTree> { }
|
|
|
|
//// [interfaceDoesNotDependOnBaseTypes.js]
|
|
var x;
|
|
if (typeof x !== "string") {
|
|
x.push("");
|
|
x.push([""]);
|
|
}
|