-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use symbol for the
others
handler
* fix: doc comment * fix: use a symbol as a key for the "others" handler * fix: more compact default handler usage (requested) * fix: give another life to HM inference * fix: add MergedHandlerMap type Co-authored-by: Mohammad Hasani <thebrodmann@protonmail.com>
- Loading branch information
Showing
5 changed files
with
72 additions
and
45 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
src/__tests__/__snapshots__/create-handler-map.dts.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`createHandlerMap handle([increment, increase], (state: number) => state + 1) (type) should match snapshot 1`] = `"HandlerMap<number, { type: \\"[Counter] increment\\"; } | { type: \\"[Counter] increase\\"; }, number>"`; | ||
exports[`createHandlerMap handle([increment, increase], (state: number) => state + 1) (type) should match snapshot 1`] = `"CustomHandlerMap<number, { type: \\"[Counter] increment\\"; } | { type: \\"[Counter] increase\\"; }, number>"`; | ||
|
||
exports[`createHandlerMap handle(increment, (state: number) => state + 1) (type) should match snapshot 1`] = `"HandlerMap<number, { type: \\"[Counter] increment\\"; }, number>"`; | ||
exports[`createHandlerMap handle(increment, (state: number) => state + 1) (type) should match snapshot 1`] = `"CustomHandlerMap<number, { type: \\"[Counter] increment\\"; }, number>"`; | ||
|
||
exports[`createHandlerMap handle.others((state: number) => state + 1) (type) should match snapshot 1`] = `"{ default: Handler<number, any, number>; }"`; | ||
exports[`createHandlerMap handle.others((state: number) => state + 1) (type) should match snapshot 1`] = `"OthersHandlerMap<number, any, number>"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters