@types/element-size
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Installation

npm install --save @types/element-size

Summary

This package contains type definitions for element-size (https://github.com/hughsk/element-size).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/element-size.

index.d.ts

/**
 * Given a DOM element, return an array containing that element's width and height in pixels.
 */
declare function getSize(element: EventTarget | Document | HTMLElement): [number, number];

/**
 * Get the size of an element in pixels, including margins
 */
export = getSize;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/element-size

Weekly Downloads

62

Version

1.1.2

License

MIT

Unpacked Size

3.15 kB

Total Files

5

Last publish

Collaborators

  • types