object-shape-tester - v6.9.2
    Preparing search index...

    Function unknownShape

    • Creates a shape that allows any value. This should be used sparingly.

      Type Parameters

      • T = unknown

      Parameters

      • OptionaldefaultValue: unknown

      Returns Shape<TUnsafe<T>>

      import {unknownShape, checkValidShape} from 'object-shape-tester';

      const myShape = unknownShape();

      checkValidShape('a', myShape); // `true`
      checkValidShape(10, myShape); // `true`
      checkValidShape({}, myShape); // `true`