diff --git a/components/button/button.tsx b/components/button/button.tsx index 2f01760638..b47e16a96b 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -120,7 +120,7 @@ class Button extends React.Component { loading: false, ghost: false, block: false, - htmlType: 'button', + htmlType: 'button' as ButtonProps['htmlType'], }; private delayTimeout: number; diff --git a/components/collapse/Collapse.tsx b/components/collapse/Collapse.tsx index 436ccad3f1..0fe9c53221 100644 --- a/components/collapse/Collapse.tsx +++ b/components/collapse/Collapse.tsx @@ -40,7 +40,7 @@ export default class Collapse extends React.Component { static defaultProps = { bordered: true, - expandIconPosition: 'left', + expandIconPosition: 'left' as CollapseProps['expandIconPosition'], }; renderExpandIcon = (panelProps: PanelProps = {}, prefixCls: string) => { diff --git a/components/progress/progress.tsx b/components/progress/progress.tsx index f4bcb662d7..c5b57651b5 100644 --- a/components/progress/progress.tsx +++ b/components/progress/progress.tsx @@ -43,14 +43,14 @@ export interface ProgressProps { export default class Progress extends React.Component { static defaultProps = { - type: 'line', + type: 'line' as ProgressProps['type'], percent: 0, showInfo: true, // null for different theme definition trailColor: null, - size: 'default', + size: 'default' as ProgressProps['size'], gapDegree: undefined, - strokeLinecap: 'round', + strokeLinecap: 'round' as ProgressProps['strokeLinecap'], }; getPercentNumber() { diff --git a/components/tabs/TabBar.tsx b/components/tabs/TabBar.tsx index 0df600e9c6..27a93aebc0 100644 --- a/components/tabs/TabBar.tsx +++ b/components/tabs/TabBar.tsx @@ -12,7 +12,7 @@ import { ConfigConsumerProps, ConfigConsumer } from '../config-provider'; export default class TabBar extends React.Component { static defaultProps = { animated: true, - type: 'line', + type: 'line' as TabsProps['type'], }; renderTabBar = ({ direction }: ConfigConsumerProps) => { diff --git a/components/timeline/Timeline.tsx b/components/timeline/Timeline.tsx index 7f2f902c43..2bc67ccf8b 100644 --- a/components/timeline/Timeline.tsx +++ b/components/timeline/Timeline.tsx @@ -21,7 +21,7 @@ export default class Timeline extends React.Component { static defaultProps = { reverse: false, - mode: '', + mode: '' as TimelineProps['mode'], }; renderTimeline = ({ getPrefixCls, direction }: ConfigConsumerProps) => { diff --git a/components/tree/DirectoryTree.tsx b/components/tree/DirectoryTree.tsx index fd55d05750..13c0d758cc 100644 --- a/components/tree/DirectoryTree.tsx +++ b/components/tree/DirectoryTree.tsx @@ -39,7 +39,7 @@ function getTreeData({ treeData, children }: DirectoryTreeProps) { class DirectoryTree extends React.Component { static defaultProps = { showIcon: true, - expandAction: 'click', + expandAction: 'click' as DirectoryTreeProps['expandAction'], }; static getDerivedStateFromProps(nextProps: DirectoryTreeProps) {