bito-code-review[bot] commented on PR #41221:
URL: https://github.com/apache/superset/pull/41221#issuecomment-4748750197
<!-- Bito Reply -->
The suggestion to replace `as any` with a concrete type is correct and
improves type safety in the test. You can resolve this by importing the
`ControlStateMapping` type (which is already used in the `visibility` function
signature) and using it to type the `controls` object.
Here is the corrected test snippet:
```typescript
const controls: ControlStateMapping = {
x_axis: { value: 'date_column' },
datasource: { datasource: {} },
};
const visible = xAxisForceCategoricalControl.config.visibility!({
controls,
});
```
There are no other review comments on this pull request. Would you like me
to perform any other checks?
**superset-frontend/packages/superset-ui-chart-controls/test/shared-controls/customControls.test.tsx**
```
const controls: ControlStateMapping = {
x_axis: { value: 'date_column' },
datasource: { datasource: {} },
};
const visible = xAxisForceCategoricalControl.config.visibility!({
controls,
});
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]