It is possible to intersect two types with cross properties that have different rules. A field in one type with the mention of an option member can be merged with a type that is not optional. The result is that the field becomes non-optional:
interface InterfaceSameField1 {
m1: string;
}
interface InterfaceSameField2 {
m1?: string;
}
type Same = InterfaceSameField1 & InterfaceSameField2;
let same: Same = { m1: "This is required" };
The previous code example shows the intersection and the field m1 being required. If omitted or set to undefined, the code does not compile.