Nested Intersection Types are supported?
Code:
interface A {
nested: {
kyoppie: string;
}
}
interface B {
nested: {
yuppie: string;
}
}
const ab: A & B = {
nested: {
kyoppie: 'aaa',
yuppie: 'bbb' // <- Error
}
};
Got:
error TS2322:
Type '{ nested: { kyoppie: string; yuppie: string; }; }' is not assignable to type 'A & B'
Type '{ nested: { kyoppie: string; yuppie: string; }; }' is not assignable to type 'A'.
Types of property 'nested' are incompatible.
Type '{ kyoppie: string; yuppie: string; }' is not assignable to type '{ kyoppie: string; }'.
Object literal may only specify known properties, and 'yuppie' does not exist in type '{ kyoppie: string; }'.
My TypeScript Version: 1.8.9
Sorry my bad English. Thanks!
Nested Intersection Types are supported?
Code:
Got:
My TypeScript Version: 1.8.9
Sorry my bad English. Thanks!