refactor: Change type from ClientRect to DOMRect #2481
Merged
+9
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hi I'm a developer following this project with interest. I was looking at the internal code and found something I could contribute, so I made a PR.
The
ClientRect
dom interface is deprecated in typescript 4.4 and you can useDomRect
instead. I changed the observeElementRect.ts, ScrollArea.tsx, Slider.tsx, and useRect.tsx files that use the ClientRect interface to use DomRect.Please let me know if you have any feedback to contribute. Thanks.
https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/d5f8ed6c1bdc0ad8b5953375f7813bc14b88c19a/baselines/dom.generated.d.ts#L5628
dom.d.ts change log
microsoft/TypeScript-DOM-lib-generator#1029