I am defining a class in TypeScript. So with the spread operator I can issue something like this:
class Foo {
  constructor(data: IDataStructure){
      const { ...k } = data; // and then k has taken over all the properties of data. Great!
  }
  public render () {
    return(<div/>
   );
  }
}
Now, I would love to do the same but not to put the properties in k but in the current object that is being created. I.e. I would like to do something like const { ...this } = data; Is there any smart way to do this in Typescript?
 
    