arktype icon indicating copy to clipboard operation
arktype copied to clipboard

Create a robust lazy resolution system, integrate with transforms

Open ssalbdivad opened this issue 2 months ago • 0 comments

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.

ssalbdivad avatar May 03 '24 13:05 ssalbdivad