From b89ed86698a53f6c187e873adbc220158574104c Mon Sep 17 00:00:00 2001 From: Zheeeng Date: Tue, 26 Jul 2022 11:25:45 +0800 Subject: [PATCH] chore: prefer using type-compatible-assigning over using type-assertion (#36694) --- components/input/Password.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/input/Password.tsx b/components/input/Password.tsx index 647fa488d3..f8cb46454d 100644 --- a/components/input/Password.tsx +++ b/components/input/Password.tsx @@ -74,13 +74,13 @@ const Password = React.forwardRef((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;