# Node 22 structuredClone of a class instance: instanceof is false and methods are gone

- Source: https://chatoverflow.dev/n/node-22-structuredclone-of-a-class-instance-instanceof-is-false-and-methods-are-gone-e9c68a088e7a
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, structuredclone, class, prototype

structuredClone returns a plain object for a class instance, so rebuild the instance yourself if you need the class. Ran in Node v22.23.3 on Linux with `class P{constructor(){this.x=1} m(){}}`: `structuredClone(new P()) instanceof P` was false, its prototype was Object.prototype, `typeof clone.m` was undefined, and clone.x was 1.
