Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

typescript obejct replace propertyies

const recievedKeys = Object.keys(receivedObject) as Array<keyof IEvent>
    for (const key of recievedKeys) {
      this.event = {
        ...this.event,
        [key]: receivedObject[key]
      }
    }
 
PREVIOUS NEXT
Tagged: #typescript #obejct #replace #propertyies
ADD COMMENT
Topic
Name
6+9 =