mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
chore(frontend): comprehensive TypeScript quality improvements (#37625)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { t } from '@apache-superset/core';
|
||||
import { Collapse, Label } from '@superset-ui/core/components';
|
||||
import TextControl from 'src/explore/components/controls/TextControl';
|
||||
@@ -65,17 +64,6 @@ interface FixedOrMetricControlState {
|
||||
metricValue: MetricValue | null;
|
||||
}
|
||||
|
||||
const propTypes = {
|
||||
onChange: PropTypes.func,
|
||||
value: PropTypes.object,
|
||||
isFloat: PropTypes.bool,
|
||||
datasource: PropTypes.object.isRequired,
|
||||
default: PropTypes.shape({
|
||||
type: PropTypes.oneOf(['fix', 'metric']),
|
||||
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
}),
|
||||
};
|
||||
|
||||
const defaultProps = {
|
||||
onChange: () => {},
|
||||
default: { type: controlTypes.fixed, value: 5 },
|
||||
@@ -216,7 +204,5 @@ export default class FixedOrMetricControl extends Component<
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error - propTypes are defined for runtime validation but TypeScript handles type checking
|
||||
FixedOrMetricControl.propTypes = propTypes;
|
||||
// @ts-expect-error - defaultProps for backward compatibility with PropTypes
|
||||
// @ts-expect-error - defaultProps for backward compatibility
|
||||
FixedOrMetricControl.defaultProps = defaultProps;
|
||||
|
||||
Reference in New Issue
Block a user