arktype
arktype copied to clipboard
Create a robust lazy resolution system, integrate with transforms
The current transform behavior for cyclic nodes is not robust. I slapped together a ctx with seen and lazy resolutions, but currently lazilyResolve
is limited to root nodes, whereas to support this it needs to be able to handle any composite node kind (see Node.transform at ark/schema/node.ts).
My initial thoughts were a scope should keep create a unique id per transformation when the root transform call is made.
Then each id
in seen would be lazily resolved to that id prefixed with the transform id.