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
/** * * Adds equality functions to a data object. This freezes an object. * HashCode is lazily evaluated and memoized. * * @param <D> The type of the data object * @param data The data object to add equality to * @param equals The equality function * @param hashCode The hash code function * * @returns The data object with equality added */exportdefaultfunction<DextendsRecord<string,unknown>>(data: D,equals: (a: D,b: D)=>boolean,hashCode: (data: D)=>number): D&HasEquals{// ....}
Needs @param hashCode.__type and @param equals.__type, else validation will show the following:
./src/lib/utils/addEquality.ts:20:10 - warning addEquality.equals.__type does not have any documentation.
20 equals: (a: D, b: D) => boolean,
./src/lib/utils/addEquality.ts:21:12 - warning addEquality.hashCode.__type does not have any documentation.
21 hashCode: (data: D) => number
The text was updated successfully, but these errors were encountered:
Hmm... on second review, I guess it's technically correct that the a parameter of equals isn't documented. I don't think it makes sense to complain about this. You could add an inline comment for this parameter, but I think I'm going to update the validation to ignore parameters within parameters...
Hi! To clarify the title, the following code:
Needs
@param hashCode.__type
and@param equals.__type
, else validation will show the following:The text was updated successfully, but these errors were encountered: