Consider having two distinct interfaces:
interface InterfaceOne {
myString: string,
myNum: number
}
interface interfaceTwo extends InterfaceOne {
myBool: boolean
}
Utilizing the TypeScript code below:
let somedata: interfaceTwo = {
myString: "hello world",
myNum: 42,
myBool: false
Is there a method to transform somedata
into an InterfaceOne
, while eliminating the myBool
property from the object?