Skip to content

Commit 1ee43e8

Browse files
committed
chore(utils/react): get rid of ts-expect-error
1 parent db6ab9c commit 1ee43e8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/utils/react/react.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,15 @@ export function wrapReactClass(node: any, prop: any = 'type') {
104104

105105
export function getReactRoot(o: HTMLElement | Element | Node) {
106106
return (
107-
// @ts-expect-error 7053
108-
o[Object.keys(o).find((k) => k.startsWith('__reactContainer$')) as string] ||
109-
// @ts-expect-error 7053
110-
o['_reactRootContainer']?._internalRoot?.current
107+
(o as any)[Object.keys(o).find((k) => k.startsWith('__reactContainer$')) as string] ||
108+
(o as any)['_reactRootContainer']?._internalRoot?.current
111109
);
112110
}
113111

114112
export function getReactInstance(o: HTMLElement | Element | Node) {
115113
return (
116-
// @ts-expect-error 7053
117-
o[Object.keys(o).find((k) => k.startsWith('__reactFiber')) as string] ||
118-
// @ts-expect-error 7053
119-
o[Object.keys(o).find((k) => k.startsWith('__reactInternalInstance')) as string]
114+
(o as any)[Object.keys(o).find((k) => k.startsWith('__reactFiber')) as string] ||
115+
(o as any)[Object.keys(o).find((k) => k.startsWith('__reactInternalInstance')) as string]
120116
);
121117
}
122118

0 commit comments

Comments
 (0)