Browse Source

chore: prefer using type-compatible-assigning over using type-assertion (#36694)

pull/36706/head
Zheeeng 2 years ago
committed by GitHub
parent
commit
b89ed86698
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/input/Password.tsx

4
components/input/Password.tsx

@ -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…
Cancel
Save