Add regression test for #29168

This commit is contained in:
Anders Hejlsberg 2019-01-20 08:21:41 -08:00
parent dbea08f9c8
commit cf479fc384

View file

@ -93,4 +93,30 @@ let xyz: LikeA | LikeB = {
}
};
xyz;
xyz;
// Repro from #29168
interface TestObject {
type?: 'object';
items: {
[k: string]: TestGeneric;
};
}
interface TestString {
type: 'string';
}
type TestGeneric = (TestString | TestObject) & { [k: string]: any; };
const test: TestGeneric = {
items: {
hello: { type: 'string' },
world: {
items: {
nested: { type: 'string' }
}
}
}
};