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

    Function tupleShape

    • Define a shape part requires a tuple.

      Type Parameters

      • Parts extends readonly any[]

      Parameters

      Returns ShapeTuple<Parts>

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

      const myShape = defineShape({
      a: tupleShape('a', -1, exact('hi')),
      });

      // `myShape.runtimeType` is `[string, number, 'hi']`