/**
* Modify a type `T` by replacing properties with the properties of type `R`.
*
* @template T - The original type.
* @template R - The type with properties to replace in `T`.
*/
type Modify<T, R> = Omit<T, keyof R> & R;
// Example usage of Modify type
interface Original {
a: number;
b: string;
}
interface Replacement {
b: boolean;
c: string;
}
type Modified = Modify<Original, Replacement>;
// Modified is now { a: number; b: boolean; c: string; }