• Preparing search index...
  • The search index is not available
object-shape-tester - v5.1.5
  • object-shape-tester
  • classShape

Function classShape

  • classShape<Parts extends [AnyConstructor]>(...parts: Parts): ShapeClass<Parts>

    Define a shape part that requires an instance of the given constructor.

    Type Parameters

    • Parts extends [AnyConstructor]

    Parameters

    • ...parts: Parts

    Returns ShapeClass<Parts>

    Example

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

    const myShape = defineShape({
    a: classShape(RegExp),
    });

    // `myShape.runtimeType` is `{a: RegExp}`
    • Defined in src/define-shape/shape-specifiers.ts:251

Settings

Member Visibility
object-shape-tester - v5.1.5
  • Loading...

Generated using TypeDoc