mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
chore: prefer using type-compatible-assigning over using type-assertion (#36694)
This commit is contained in:
parent
16d2c5def3
commit
b89ed86698
@ -74,13 +74,13 @@ const Password = React.forwardRef<InputRef, PasswordProps>((props, ref) => {
|
|||||||
[`${prefixCls}-${size}`]: !!size,
|
[`${prefixCls}-${size}`]: !!size,
|
||||||
});
|
});
|
||||||
|
|
||||||
const omittedProps = {
|
const omittedProps: InputProps = {
|
||||||
...omit(restProps, ['suffix', 'iconRender']),
|
...omit(restProps, ['suffix', 'iconRender']),
|
||||||
type: visible ? 'text' : 'password',
|
type: visible ? 'text' : 'password',
|
||||||
className: inputClassName,
|
className: inputClassName,
|
||||||
prefixCls: inputPrefixCls,
|
prefixCls: inputPrefixCls,
|
||||||
suffix: suffixIcon,
|
suffix: suffixIcon,
|
||||||
} as InputProps;
|
};
|
||||||
|
|
||||||
if (size) {
|
if (size) {
|
||||||
omittedProps.size = size;
|
omittedProps.size = size;
|
||||||
|
Loading…
Reference in New Issue
Block a user