suddjian commented on a change in pull request #11814:
URL:
https://github.com/apache/incubator-superset/pull/11814#discussion_r538899857
##########
File path: superset-frontend/src/explore/actions/exploreActions.ts
##########
@@ -86,7 +86,7 @@ export function fetchFaveStar(sliceId: string) {
export const SAVE_FAVE_STAR = 'SAVE_FAVE_STAR';
export function saveFaveStar(sliceId: string, isStarred: boolean) {
- return function (dispatch: Dispatch<ReturnType<typeof addDangerToast>>) {
+ return function (dispatch: Dispatch) {
Review comment:
At least, not without more robust typings on our Actions and on the
Store. You can see an example of well-typed reducers and actions in the
`nativeFilters` actions and reducers added in this PR. Arranging types in a way
that doesn't make development difficult is kind of tricky.
##########
File path: superset-frontend/src/explore/actions/exploreActions.ts
##########
@@ -86,7 +86,7 @@ export function fetchFaveStar(sliceId: string) {
export const SAVE_FAVE_STAR = 'SAVE_FAVE_STAR';
export function saveFaveStar(sliceId: string, isStarred: boolean) {
- return function (dispatch: Dispatch<ReturnType<typeof addDangerToast>>) {
+ return function (dispatch: Dispatch) {
Review comment:
At least, not without more robust typings on our Actions and on the
Store. You can see an example of well-typed reducers and actions in the
`nativeFilters` actions and reducers added in this PR. Arranging redux-adjacent
types in a way that doesn't make development difficult is kind of tricky.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]