$exportNodeJSON
functionExport one node's JSON in the form the active export asks for, with the sanity checks every export walk relies on: the serialized `type` must match the class, and an element must carry a `children` array for the walk to fill. Use this instead of calling `node.exportJSON()` directly when writing a serialization walk of your own — it is what `editorState.toJSON()` and the `@lexical/clipboard` selection export both call, so $withCompactExport governs every one of them alike. Which form that is decides the shape, so the return type is the SerializedPartial — the one both forms satisfy. A caller that knows it is not under $withCompactExport and wants the full type should call `node.exportJSON()` directly.