import {partialShape, checkValidShape} from 'object-shape-tester';
const myShape = partialShape({
id: '',
name: '',
age: -1,
});
checkValidShape({}, myShape); // `true`
checkValidShape(
{
id: '123',
name: 'hello',
},
myShape,
); // `true`
checkValidShape(
{
invalid: 'prop',
},
myShape,
); // `false`
Converts an object shape to a partial shape.