Typescript type conflict in dependency `resize-observer-polyfill`
johnsonsu opened this issue ยท 1 comments
johnsonsu commented
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:
- Create new react app using the typescript template
npx create-react-app my-app --template typescript
- Install
masonic
- In
App.tsx
, import masonic - 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 commented
๐ This issue has been resolved in version 3.6.3 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐