typescript pick properties from object function overload code example
Example: typescript utility types merge interfaces
interface A {
x: string
}
interface B extends Omit<A, 'x'> {
x: number
}
interface A {
x: string
}
interface B extends Omit<A, 'x'> {
x: number
}