Skip to content

Commit

Permalink
chore: Add doc comment to store "off" function
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Apr 30, 2023
1 parent edd4782 commit cbfe426
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const store = <T extends Record<string | symbol, unknown>>(
...initialState,
on(key, fn) {
(handlers[key] ??= []).push(fn);
return () => {
return /** off */ () => {
// eslint-disable-next-line no-bitwise
handlers[key]?.splice(handlers[key]!.indexOf(fn) >>> 0, 1);
};
Expand Down

0 comments on commit cbfe426

Please sign in to comment.