Dynamic type based on another value
Given a theoretical example like this:
Is it possible to only have
Is it possible to only have
clauses be required if agree is true?clausesagreetrueconst formDef = type({
agree: 'boolean',
clauses: ['===', 'first', 'second'],
})