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

refactor: Change type from ClientRect to DOMRect #2481

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

2-NOW
Copy link

@2-NOW 2-NOW commented Oct 24, 2023

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 use DomRect 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

/** @deprecated */
interface ClientRect extends DOMRect {
}

dom.d.ts change log
microsoft/TypeScript-DOM-lib-generator#1029

…t.ts, ScrollArea.tsx, Slider.tsx, and useRect.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant