Add regression test for #29168
This commit is contained in:
parent
dbea08f9c8
commit
cf479fc384
|
@ -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' }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue