mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +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,
|
||||
});
|
||||
|
||||
const omittedProps = {
|
||||
const omittedProps: InputProps = {
|
||||
...omit(restProps, ['suffix', 'iconRender']),
|
||||
type: visible ? 'text' : 'password',
|
||||
className: inputClassName,
|
||||
prefixCls: inputPrefixCls,
|
||||
suffix: suffixIcon,
|
||||
} as InputProps;
|
||||
};
|
||||
|
||||
if (size) {
|
||||
omittedProps.size = size;
|
||||
|
Loading…
Reference in New Issue
Block a user