How to use the runtypes.Boolean.Or function in runtypes

To help you get started, we’ve selected a few runtypes examples, based on popular ways it is used in public projects.

github typeetfunc / runtypes-generate / src / custom.spec.ts View on Github external
const MemberWithRole = role => Record({
    role,
    fio: Fio
  }).And(
    Partial({
      dependant: Boolean.Or(Void)
    })
  )
  const Spouse = MemberWithRole(Literal('spouse'))