How would you deep-clone a class?

I need to copy a class like this:

 export class particle {
      constructor(x:number, y:number) {
          this.x = x
          this.y = y
      }

     clone(): particle{
        return this.clone()
     }
}

And yeah, while i could do it like this:

     clone(): particle{
        return new particle(this.x, this.y)
     }

That would take alot of arguments for a class with alot of things in it. How do you clone it properly?
All the answers online dont work with makecode arcade. (prob because the version of typescript is outdated :wink:)