You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type A = {
shared: string;
something: true;
exclusiveToA: string;
}
type B = {
shared: string;
something: false;
exclusiveToB: string;
}
type C = A | B;
type D = Omit<C, 'shared'>;
const a: D = {
something: true,
exclusiveToA: 'here',
}
const b: D = {
something: false,
exclusiveToB: 'here',
}
π Actual behavior
Omit strips away properties of its union type operands that don't have common keys
π Expected behavior
Omit should recursively distribute over union/product type expressions
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
omit union
π Version & Regression Information
β― Playground Link
Playground Link
π» Code
π Actual behavior
Omit
strips away properties of its union type operands that don't have common keysπ Expected behavior
Omit
should recursively distribute over union/product type expressionsThe text was updated successfully, but these errors were encountered: