Hi! To clarify the title, the following code:
/**
*
* 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
*/
export default function <D extends Record<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
Owner Name | TypeStrong |
Repo Name | typedoc |
Full Name | TypeStrong/typedoc |
Language | TypeScript |
Created Date | 2014-05-24 |
Updated Date | 2023-03-19 |
Star Count | 6487 |
Watcher Count | 68 |
Fork Count | 639 |
Issue Count | 48 |
Issue Title | Created Date | Updated Date |
---|