Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript type conflict in dependency resize-observer-polyfill #101

Closed
johnsonsu opened this issue Jan 5, 2022 · 1 comment · Fixed by #100
Closed

Typescript type conflict in dependency resize-observer-polyfill #101

johnsonsu opened this issue Jan 5, 2022 · 1 comment · Fixed by #100
Labels

Comments

@johnsonsu
Copy link
Contributor

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 {
@github-actions
Copy link

🎉 This issue has been resolved in version 3.6.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant