jaredLunde/masonic

Typescript type conflict in dependency `resize-observer-polyfill`

johnsonsu opened this issue ยท 1 comments

Describe the bug
There is a type conflict in the dependency library resize-observer-polyfill which causes masonic to fail at build with typescript 4.2.3 or above.
Discussion: que-etc/resize-observer-polyfill#83

Since the resize-observer-polyfill is not actively maintained, I suggest switching to https://github.com/juggle/resize-observer. Hopefully this is a drop-in replacement for the old library.

To Reproduce
Steps to reproduce the behavior:

  1. Create new react app using the typescript templatenpx create-react-app my-app --template typescript
  2. Install masonic
  3. In App.tsx, import masonic
  4. Run npm start

Expected behavior
React app should start at localhost:3000.

Additional context
Error message:

TypeScript error in /create-react-app/node_modules/resize-observer-polyfill/src/index.d.ts(19,18):
Subsequent property declarations must have the same type.  Property 'contentRect' must be of type 'DOMRectReadOnly', but here has type 'DOMRectReadOnly'.  TS2717

    17 |     interface ResizeObserverEntry {
    18 |         readonly target: Element;
  > 19 |         readonly contentRect: DOMRectReadOnly;
       |                  ^
    20 |     }
    21 |
    22 |     interface ResizeObserver {

๐ŸŽ‰ This issue has been resolved in version 3.6.3 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€