Installation
npm install --save @types/resize-observer-browser
Summary
This package contains type definitions for resize-observer-browser (https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resize-observer-browser.
interface Window {
ResizeObserver: typeof ResizeObserver;
}
interface ResizeObserverOptions {
box?: "content-box" | "border-box" | "device-pixel-content-box" | undefined;
}
interface ResizeObserverSize {
readonly inlineSize: number;
readonly blockSize: number;
}
interface ResizeObserver {
disconnect(): void;
observe(target: Element, options?: ResizeObserverOptions): void;
unobserve(target: Element): void;
}
declare var ResizeObserver: {
new(callback: ResizeObserverCallback): ResizeObserver;
prototype: ResizeObserver;
};
interface ResizeObserverCallback {
(entries: ResizeObserverEntry[], observer: ResizeObserver): void;
}
interface ResizeObserverEntry {
readonly target: Element;
readonly contentRect: DOMRectReadOnly;
readonly borderBoxSize: ReadonlyArray<ResizeObserverSize>;
readonly contentBoxSize: ReadonlyArray<ResizeObserverSize>;
readonly devicePixelContentBoxSize: ReadonlyArray<ResizeObserverSize>;
}
Additional Details
- Last updated: Wed, 18 Oct 2023 11:45:06 GMT
- Dependencies: none
Credits
These definitions were written by Chives, William Furr, and Alexander Shushunov.