Creates a shape that merges multiple objects together. Note that intersecting fixed properties with a recordShape (or other generic mapped object keys) is not supported and will break in many ways.
recordShape
import {intersectShape, checkValidShape} from 'object-shape-tester';const myShape = intersectShape( { a: '', }, { b: '', },);checkValidShape({a: 'hi', b: 'bye'}, myShape); // `true`checkValidShape({a: 'hi'}, myShape); // `false` Copy
import {intersectShape, checkValidShape} from 'object-shape-tester';const myShape = intersectShape( { a: '', }, { b: '', },);checkValidShape({a: 'hi', b: 'bye'}, myShape); // `true`checkValidShape({a: 'hi'}, myShape); // `false`
Creates a shape that merges multiple objects together. Note that intersecting fixed properties with a
recordShape(or other generic mapped object keys) is not supported and will break in many ways.