1interface ISomeObject {
2 subPropertie1: string,
3 subPropertie2: number,
4}
5
6interface IProperties {
7 property1: string,
8 property2: boolean,
9 property3: number[],
10 property4: ISomeObject,
11 property5: ISomeObject[],
12}
13
14function (args:IProperties): void { // Sample Usage
15 console.log(args.property1);
16}
1const recievedKeys = Object.keys(receivedObject) as Array<keyof IEvent>
2 for (const key of recievedKeys) {
3 this.event = {
4 ...this.event,
5 [key]: receivedObject[key]
6 }
7 }
1ts// 1. Select the div element using the id property
2const app = document.getElementById("app");
3
4// 2. Create a new <p></p> element programmatically
5const p = document.createElement("p");
6
7// 3. Add the text content
8p.textContent = "Hello, World!";
9
10// 4. Append the p element to the div element
11app?.appendChild(p);