Skip to content

Commit f711f1c

Browse files
committed
chore: remove react type compatibility shim
1 parent 1535311 commit f711f1c

3 files changed

Lines changed: 5 additions & 32 deletions

File tree

react-compat.d.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/Preview/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const Preview: React.FC<PreviewProps> = props => {
199199
focusTrap = true,
200200
} = props;
201201

202-
const imgRef = useRef<HTMLImageElement>();
202+
const imgRef = useRef<HTMLImageElement>(null);
203203
const wrapperRef = useRef<HTMLDivElement>(null);
204204
const triggerRef = useRef<HTMLElement>(null);
205205

tsconfig.json

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,9 @@
77
"skipLibCheck": true,
88
"esModuleInterop": true,
99
"paths": {
10-
"@/*": [
11-
"./src/*"
12-
],
13-
"@@/*": [
14-
"./.dumi/tmp/*"
15-
],
16-
"@rc-component/image": [
17-
"./src/index.ts"
18-
]
10+
"@/*": ["./src/*"],
11+
"@@/*": ["./.dumi/tmp/*"],
12+
"@rc-component/image": ["./src/index.ts"]
1913
},
2014
"noImplicitAny": false,
2115
"strictNullChecks": false,
@@ -26,14 +20,5 @@
2620
"strictBindCallApply": false,
2721
"module": "ESNext"
2822
},
29-
"include": [
30-
"react-compat.d.ts",
31-
"global.d.ts",
32-
".dumirc.ts",
33-
".fatherrc.ts",
34-
"docs",
35-
"src",
36-
"tests",
37-
"typings.d.ts"
38-
]
23+
"include": ["global.d.ts", ".dumirc.ts", ".fatherrc.ts", "docs", "src", "tests", "typings.d.ts"]
3924
}

0 commit comments

Comments
 (0)