Skip to content

Commit

Permalink
feat: Simplify type
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Apr 30, 2023
1 parent 8e2e9c2 commit edd4782
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
@@ -1,6 +1,6 @@
type Handler<T, K extends keyof T> = (value: T[K], prev: T[K]) => void;
type Store<T> = T & {
readonly on: <K extends keyof Omit<T, 'on'>>(
readonly on: <K extends keyof T>(
key: K,
callback: Handler<T, K>,
) => /** off */ () => void;
Expand Down

0 comments on commit edd4782

Please sign in to comment.