diff --git a/ts/hooks/useHasWrapped.ts b/ts/hooks/useHasWrapped.ts index a61cbfc71..11f3e3890 100644 --- a/ts/hooks/useHasWrapped.ts +++ b/ts/hooks/useHasWrapped.ts @@ -40,10 +40,7 @@ export function useHasWrapped(): [Ref, boolean] { return noop; } - // We can remove this `any` when we upgrade to TypeScript 4.2+, which adds - // `ResizeObserver` type definitions. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const observer = new (window as any).ResizeObserver(() => { + const observer = new ResizeObserver(() => { setHasWrapped(isWrapped(element)); }); observer.observe(element);