You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hm at the time i didn't realize any included also undefined...
actually i think the right fix would be in hasEquals:
export function hasEquals(v: WithEquality): v is HasEquals {
// there is a reason why we check only for equals, not for hashCode.
// we want to decide which codepath to take: === or equals/hashcode.
// if there is a equals function then we don't want ===, regardless of
// whether there is a hashCode method or not. If there is a equals
// and not hashCode, we want to go on the equals/hashCode codepath,
// which will blow a little later at runtime if the hashCode is missing.
- return ((<HasEquals>v).equals !== undefined);+ return "equals" in v;
}
I'd definitely merge such a PR (assuming the tests pass and so on), and release shortly afterwards.
PS: sorry about the delay, I missed the notification during my holidays.
As
prelude-ts/src/Comparison.ts
Line 82 in 736e40c
is there a reason that undefined isn't handled here? Or would you take a PR that changes this?
The text was updated successfully, but these errors were encountered: