mirror of
https://github.com/zhigang1992/react.git
synced 2026-03-26 06:55:07 +08:00
fix(union-type): fix union type overridden by default-props type
This commit is contained in:
@@ -7,7 +7,7 @@ const withDefaults = <P, DP>(
|
||||
type Props = Partial<DP> & Omit<P, keyof DP>
|
||||
component.defaultProps = defaultProps
|
||||
|
||||
return (component as React.ComponentType<any>) as React.ComponentType<Props>
|
||||
return component as React.ComponentType<Props>
|
||||
}
|
||||
|
||||
export default withDefaults
|
||||
|
||||
Reference in New Issue
Block a user