Top-level sharedtype copy / clone / delete

Hello, first thanks for this amazing work!

There is no way to clone/copy a top-level type and attach them to a fresh Y.DOC instance?
I need to delete some things and I need to change some top-level key’s but until now i don’t found a solution except for replacing it in the binary directly / delete those item’s out of the binary. But that feels pretty scary and dirty too :smiley:

I saw that deletion of top-level types is not possible that is made clear like here. Just their content is delete able.

by the way that site is awsome ^^

Hi @superbertberg,

No, unfortunately, you have to implement the copy-logic yourself.

Manipulating the binary manually is extremely dangerous. There are several optimizations that you might break and then you might end up in a forever-broken document. Cloning content to a fresh document seems much safer to me :wink: