You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arktype does not work in Expo, when Disjoint.withPrefixKey is called internally #1645
The same issue that was reported in issue #1027 and fixed in arktype version 2.1.4 for Disjoint.invert is also present in Disjoint.withPrefixKey (and not yet fixed, as of version 2.2.3). Hermes does not preserve Array subclasses through Array.prototype.map.
The issue can be reproduced with any union of two object literals whose branches are disjoint at a key. For example:
import{type}from"arktype"// TypeError: undefined is not a functionconstresult=type({results: "Record<string, unknown>[][]",success: "true"}).or({errors: "string[]",results: "Record<string, unknown>[][]",success: "false"})
On Expo SDK 57 / React Native 0.86.2 / Hermes 0.16, this throws TypeError: undefined is not a function at the .or(...) call at runtime.
Suggested fix
We can use a similar fix/workaround like @dolgim suggested in #1027. I patched arktype locally with the following, and can confirm that it works:
Activity
pullfrog commentedon Aug 6, 2026
ssalbdivad commentedon Oct 1, 2026
Thanks for tracking this down so precisely! Fixed in #1674, going out with 2.2.7.
fix: Hermes withPrefixKey crash and Turbopack static `this` in scope.…
release: arktype 2.2.7 + dependents (#1675)