ktmud commented on a change in pull request #10068: URL: https://github.com/apache/incubator-superset/pull/10068#discussion_r441204996
########## File path: superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts ########## @@ -25,16 +25,24 @@ import getEffectiveExtraFilters from './getEffectiveExtraFilters'; const cachedFiltersByChart = {}; const cachedFormdataByChart = {}; +interface GetFormDataWithExtraFiltersArguments { + chart: Record<string, any>; Review comment: I think it'd be valuable to add specific typings as early as possible, so it can help future work down the road. The more specific the early typing is, the more it helps your second step. If it's hard to find all the props, maybe start with known props + `[key: string]: unknown`: ```ts import { ChartProps } from '@superset-ui/chart'; import { chart } from 'src/chart/chartReducer'; type ChartReducerInitialState = typeof chart; // chart query built from initialState // Ref: https://github.com/apache/incubator-superset/blob/dcac860f3e5528ecbc39e58f045c7388adb5c3d0/superset-frontend/src/dashboard/reducers/getInitialState.js#L120 interface ChartQueryPayload extends ChartReducerInitialState { id: number; formData: ChartProps['formData']; form_data: ChartProps['RawFormData']; [key: string]: unknown; } ``` ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org