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
Would it make sense to use a symbol as the prop rather than introduce a reserved string? Or are you trying to maintain straightforward JSON serializability? (perhaps prefered for #818 ?)
Yeah the string syntax already mirrors some other features like key-optionality, index signatures, "+": "reject" for specifying how undeclared keys are handled etc. so there's precedent for escaping that.
We actually don't use any symbols at all in ArkType, instead favoring string literal for internal keys like arkInferred to avoid some known issues with symbols resoloving incorrectly in node_modules and leading to inference problems or exacerbating duplicate install issues.
Activity
gabrielgrant commentedon Dec 16, 2025
Would it make sense to use a symbol as the prop rather than introduce a reserved string? Or are you trying to maintain straightforward JSON serializability? (perhaps prefered for #818 ?)
ssalbdivad commentedon Dec 16, 2025
Yeah the string syntax already mirrors some other features like key-optionality, index signatures,
"+": "reject"for specifying how undeclared keys are handled etc. so there's precedent for escaping that.We actually don't use any symbols at all in ArkType, instead favoring string literal for internal keys like
arkInferredto avoid some known issues with symbols resoloving incorrectly innode_modulesand leading to inference problems or exacerbating duplicate install issues.feat(type): describe an object with its "@" key (#1554)
docs(type): cite the issues the release fixes and add the entries it …
ssalbdivad commentedon Nov 18, 2026
Fixed in 3.0.0-beta.0 (#1728). Try it with
npm i arktype@next.