From d52b8c6afbb0d517b5351ec4c4c2a7a37bb0f5b7 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Fri, 11 Nov 2022 18:15:02 +0800 Subject: [PATCH] type: type optimization (#38510) --- components/_util/__tests__/util.test.tsx | 2 +- components/_util/__tests__/wave.test.tsx | 6 ++-- components/_util/wave.tsx | 2 +- .../config-provider/__tests__/form.test.tsx | 3 +- components/input/__tests__/focus.test.tsx | 3 +- components/layout/__tests__/index.test.tsx | 6 ++-- components/transfer/__tests__/list.test.tsx | 14 +++++++--- .../typography/__tests__/editable.test.tsx | 4 +-- .../typography/__tests__/ellipsis.test.tsx | 28 +++++++++---------- .../upload/__tests__/uploadlist.test.tsx | 2 +- .../template/Content/ComponentOverview.jsx | 2 +- 11 files changed, 40 insertions(+), 32 deletions(-) diff --git a/components/_util/__tests__/util.test.tsx b/components/_util/__tests__/util.test.tsx index 35ca704a63..419cc28703 100644 --- a/components/_util/__tests__/util.test.tsx +++ b/components/_util/__tests__/util.test.tsx @@ -152,7 +152,7 @@ describe('Test utils function', () => { describe('TransButton', () => { it('can be focus/blur', () => { - const ref = React.createRef(); + const ref = React.createRef(); render(TransButton); expect(typeof ref.current?.focus).toBe('function'); expect(typeof ref.current?.blur).toBe('function'); diff --git a/components/_util/__tests__/wave.test.tsx b/components/_util/__tests__/wave.test.tsx index 5028b7bcde..e23cf93495 100644 --- a/components/_util/__tests__/wave.test.tsx +++ b/components/_util/__tests__/wave.test.tsx @@ -174,7 +174,7 @@ describe('Wave component', () => { }); it('bindAnimationEvent should return when node is null', () => { - const ref = React.createRef(); + const ref = React.createRef(); render(