Skip to content

Commit

Permalink
fix: type fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zrwusa committed Nov 25, 2023
1 parent f9f9df8 commit 982152a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/data-structures/hash/hash-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class HashMap<K = any, V = any> {
protected _objHashFn: (key: K) => object;


constructor(elements?: Iterable<[K, V]>, options: HashMapOptions<K, V> = {
constructor(elements?: Iterable<[K, V]>, options: HashMapOptions<K> = {

hashFn: (key: K) => String(key),
objHashFn: (key: K) => (<object>key)
Expand Down
2 changes: 1 addition & 1 deletion src/types/data-structures/hash/hash-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type HashMapLinkedNode<K, V> = {
prev: HashMapLinkedNode<K, V>;
};

export type HashMapOptions<K, V> = {
export type HashMapOptions<K> = {
hashFn: (key: K) => string;
objHashFn: (key: K) => object
}

0 comments on commit 982152a

Please sign in to comment.