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
import{ArkErrors,scope}from'arktype';const$=scope({literal: '"foo"',record: {'[string]': 'value'},value: 'literal|literal[]|record',}).export();constresult=$.value({});if(resultinstanceofArkErrors){// Error: must be an array (was object)thrownewError(result.summary);}console.log('passed');
All three types in value seem to be necessary to reproduce the issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A somewhat silly reduced example:
All three types in
value
seem to be necessary to reproduce the issue.What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions