ConstEqual.laxCompare two vaules for value equality.
Unlike Equal.deep, Equal.lax's
logic does not predicate on the existence of a given key (given an object)
or index (given an array) -- only an object's values are candidates
for comparison.
Usually, you'll want to use Equal.deep, or better yet,
derive a more fine-grained equals function from a schema using the
@traversable/schema-deep-equal package.
This implementation mostly exists to maintain feature parity with validation
libraries like Zod, who do not support
exactOptionalPropertyTypes.
Equal.laxCompare two vaules for value equality.
Unlike
Equal.deep,Equal.lax's logic does not predicate on the existence of a given key (given an object) or index (given an array) -- only an object's values are candidates for comparison.Usually, you'll want to use
Equal.deep, or better yet, derive a more fine-grained equals function from a schema using the@traversable/schema-deep-equalpackage.This implementation mostly exists to maintain feature parity with validation libraries like Zod, who do not support
exactOptionalPropertyTypes.