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
DOMRectReadOnly is not compatible with native TypeScript type #73
Comments
jonastieppo
added a commit
to jonastieppo/resize-observer-polyfill
that referenced
this issue
Jan 27, 2023
This unique line solves the following error when updating for newer TS versions: Error: node_modules/resize-observer-polyfill/src/index.d.ts:19:18 - error TS2717: Subsequent property declarations must have the same type. Property 'contentRect' must be of type 'DOMRectReadOnly', but here has type 'DOMRectReadOnly'. It is related with issues que-etc#80, que-etc#53 and que-etc#73.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type used by the polyfill is not compatible with DOMRectReadOnly that is in TypeScript so you can use this this type. (the error when using this type is that toJSON is missing). So the types should use native implementation or export that interface.
I've needed to add type when creating abstract class:
The text was updated successfully, but these errors were encountered: