etr2460 commented on a change in pull request #17474:
URL: https://github.com/apache/superset/pull/17474#discussion_r752418694



##########
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:
       perhaps instead of `Record<string, any>` we could do `Record<string, 
unknown>`? Or better yet, can we find the places that use `Fieldset` and try to 
narrow this down a bit more? `any` could be a lot of things, but if we know 
it's always a `string | number | boolean` or something like that, then we could 
remove all the objects and array from the possible space 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.

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]

Reply via email to