typescript obejct replace propertyies

JavaScript
interface ISomeObject {
  subPropertie1: string,
  subPropertie2: number,
}

interface IProperties {
  property1: string,
  property2: boolean,
  property3: number[],
  property4: ISomeObject,
  property5: ISomeObject[],
}

function (args:IProperties): void {		// Sample Usage
  console.log(args.property1);
}const recievedKeys = Object.keys(receivedObject) as Array<keyof IEvent>
    for (const key of recievedKeys) {
      this.event = {
        ...this.event,
        [key]: receivedObject[key]
      }
    }ts// 1. Select the div element using the id property
const app = document.getElementById("app");

// 2. Create a new <p></p> element programmatically
const p = document.createElement("p");

// 3. Add the text content
p.textContent = "Hello, World!";

// 4. Append the p element to the div element
app?.appendChild(p);
Source

Also in JavaScript: