You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/05/21 17:40:48 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #9826: chore(ts): convert base js files to typescript

etr2460 commented on a change in pull request #9826:
URL: https://github.com/apache/incubator-superset/pull/9826#discussion_r428808431



##########
File path: superset-frontend/src/reduxUtils.ts
##########
@@ -52,17 +67,22 @@ export function alterInArr(state, arrKey, obj, alterations, idKey = 'id') {
   return { ...state, [arrKey]: newArr };
 }
 
-export function removeFromArr(state, arrKey, obj, idKey = 'id') {
-  const newArr = [];
-  state[arrKey].forEach(arrItem => {
+export function removeFromArr(
+  state: Record<string, any>,
+  arrKey: string,
+  obj: Record<string, any>,
+  idKey = 'id',

Review comment:
       i think type is auto inferred, but i can add a string type here




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org