resize-observer-polyfill icon indicating copy to clipboard operation
resize-observer-polyfill copied to clipboard

Fix the typescript type declaration

Open lulu-berlin opened this issue 5 years ago • 2 comments

In typescript (with webpack), a default import doesn't work:

import ResizeObserver from 'resize-observer-polyfill';

but a star import or an import = require import do work:

import * as ResizeObserver from 'resize-observer-polyfill';

or:

import ResizeObserver = require('resize-observer-polyfill');

Apparently there is a closed issue about this. This fixes #24.

lulu-berlin avatar Mar 14 '19 15:03 lulu-berlin

We lost an hour to this today

walkerburgin avatar Dec 09 '20 02:12 walkerburgin

We lost an hour to this today

Sorry, @walkerburgin, seems like this repository is not being maintained... My PR has been left hanging for a long time.

We have created a fork in our organization with this fix applied: https://github.com/bettermarks/resize-observer-polyfill

lulu-berlin avatar Dec 21 '20 19:12 lulu-berlin