-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve helper types for more type safety #1121
Closed
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
0768c80
feat: improve helper types to utilize Vue 2.5 types
ktsn 25775c5
feat(types): [WIP] more strict typed store assets
ktsn 21ee399
Merge branch 'dev' into feat-improve-typing
ktsn eee1f3c
fix(types): relax map state function type
ktsn f94cf70
test(types): update namespaced helper type test
ktsn a5c4e26
feat(types): allow to specify assets types on mapXXX helpers
ktsn 58d28a5
chore(types): add comments for helpers and utilities types
ktsn 0858c6d
fix(types): revert renaming Payload to avoid breaking change
ktsn 1e27c5e
feat(helpers): return root helpers if no namespace is provided to cre…
ktsn c2068f3
feat(types): add `DefineModule` utility type
ktsn 7abf34f
fix(types): allow to omit payload on mapped methods if it is untyped
ktsn 9564b80
docs(helpers): improve `createNamespacedHelpers` description
ktsn 1aa407f
fix(types): expose DefineGetters/Mutations/Actions type
ktsn cfb6042
chore: include utils.d.ts for `files` field
ktsn 00360b5
fix(types): make dispatch/commit more type safe in module actions if …
ktsn 9b89ae7
fix(types): remove default type parameters from StrictDispatch/Commit
ktsn 09475d5
refactor: use undefined type to indicate empty payload instead of null
ktsn 8e0c60b
fix(types): fix incorrect type annotation
ktsn b14662c
fix(types): fix ActionContext type
ktsn b24d744
fix(types): remove incorrect overload
ktsn 8b6a6f9
refactor(types): just use Dispatch/CommitOptions instead of BaseDispa…
ktsn 9b183f0
docs: add typescript docs
ktsn 715eaad
docs: fix typo in typescript docs
ktsn fc1f29b
docs: add a note about conditional types
ktsn c3626f7
Merge branch 'dev' into feat-improve-typing
ktsn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, what about
Mentioning TypeScript explicitly makes JS users know annotating type doesn't require much care for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds clearer than before. Thanks!