arktypea
arktype16mo ago
PIat

Dynamic type based on another value

Given a theoretical example like this:

const formDef = type({
    agree: 'boolean',
    clauses: ['===', 'first', 'second'],
})


Is it possible to only have clauses be required if agree is true?
Was this page helpful?