arktype icon indicating copy to clipboard operation
arktype copied to clipboard

Find a better strategy for external/internal implementation type compat

Open ssalbdivad opened this issue 7 months ago • 0 comments

Currently in arktype and @arktype/schema, there are lots of RawX and InternalX style types that represent inner objects. There is also a .internal prop on the external object that allows access to those.

However, the internal and external versions are not compatible in either direction in terms of types despite that they represent the same value at runtime. Beyond some cases where I can use .internal, it just results in tons of casting.

I'd like to find a more cohesive strategy to deal with this.

ssalbdivad avatar Jul 14 '24 15:07 ssalbdivad