ktmud commented on a change in pull request #10068:
URL: 
https://github.com/apache/incubator-superset/pull/10068#discussion_r441195944



##########
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'm wondering whether `chart` matches any existing types? If not, can we 
create a new interface in `src/dashboard/types.ts` and slowly expand it?

##########
File path: 
superset-frontend/src/dashboard/util/charts/getEffectiveExtraFilters.ts
##########
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-export default function getEffectiveExtraFilters(filters) {
+export default function getEffectiveExtraFilters(filters: Record<string, any>) 
{

Review comment:
       There is `DataRecordFilters` in `@superset-ui/chart` that should match 
`filters` here. And it'd be good to also create an `ExtraFilter` type:
   
   ```ts
   import { DataRecordFilters, DataRecordValue } from "@superset-ui/chart";
   
   interface ExtraFilter {
     col: string;
     op: 'in' | 'eq' | ...,
     val: DataRecordValue[]
   }
   
   export default function getEffectiveExtraFilters(filters: 
DataRecordFilters): ExtraFilter[] {
   ```




----------------------------------------------------------------
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

Reply via email to