object-shape-tester - v5.1.6
    Preparing search index...

    Function or

    • Define a shape part that's a union of all its inputs.

      Type Parameters

      • Parts extends readonly [unknown, unknown]

      Parameters

      Returns ShapeOr<Parts>

      import {or, defineShape} from 'object-shape-tester';

      const myShape = defineShape({
      a: or('', -1),
      });

      // `myShape.runtimeType` is `{a: string | number}`