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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

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