Damans227 commented on a change in pull request #17474:
URL: https://github.com/apache/superset/pull/17474#discussion_r757162386
##########
File path: superset-frontend/src/CRUD/Fieldset.tsx
##########
@@ -17,31 +17,33 @@
* under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import { Form } from 'src/components/Form';
import { recurseReactClone } from './utils';
import Field from './Field';
-const propTypes = {
- children: PropTypes.node.isRequired,
- onChange: PropTypes.func,
- item: PropTypes.object,
- title: PropTypes.node,
- compact: PropTypes.bool,
-};
-const defaultProps = {
- compact: false,
- title: null,
-};
+interface FieldsetProps {
+ children: React.ReactNode;
+ onChange: Function;
+ item: Record<string, any>;
Review comment:
@etr2460 ok, I tried narrowing this down further. So, the `Fieldset`
component is being used in the `DatasourceEditor` component, and we are passing
the state property called `datasource ` to the `item` prop of the `Fieldset`.
Interestingly, this `datasource` property has no explicit type defined and VS
code infers it to be `any`. Here's a screenshot for your reference:

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