Browse Source
chore: prefer using type-compatible-assigning over using type-assertion (#36694)
pull/36706/head
Zheeeng
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
components/input/Password.tsx
|
|
@ -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; |
|
|
|