import shape from 'dataparcels/shape';
import shape from 'react-dataparcels/shape';
shape((parcelShape: ParcelShape) => ParcelShape) => Function;

The shape function can be used inside of an updater, such as those passed to Parcel.update or Parcel.modifyUp.

It must be passed a function, which will be passed a ParcelShape and sometimes a ChangeRequest depending on what the shape() function is being passed to.

See ParcelShape for more details.

import shape from 'dataparcels/shape';

let parcel = new Parcel({
    value: [1,2,3]

let modifiedParcel = parcel.modifyDown(shape(parcelShape => parcelShape
        cool: true