Use TypeScript's ResizeObserver
types instead of any
This commit is contained in:
parent
0c83b1d26b
commit
f02b1ebce2
1 changed files with 1 additions and 4 deletions
|
@ -40,10 +40,7 @@ export function useHasWrapped<T extends HTMLElement>(): [Ref<T>, boolean] {
|
||||||
return noop;
|
return noop;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We can remove this `any` when we upgrade to TypeScript 4.2+, which adds
|
const observer = new ResizeObserver(() => {
|
||||||
// `ResizeObserver` type definitions.
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
const observer = new (window as any).ResizeObserver(() => {
|
|
||||||
setHasWrapped(isWrapped(element));
|
setHasWrapped(isWrapped(element));
|
||||||
});
|
});
|
||||||
observer.observe(element);
|
observer.observe(element);
|
||||||
|
|
Loading…
Reference in a new issue