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

Events. Type parameter for Event.currentTarget #2217

Merged
merged 12 commits into from
Feb 24, 2024
Prev Previous commit
Next Next commit
React Router. Use updated Event
turansky committed Feb 24, 2024
commit bf3cc738134fe70f6dcd50fa0b1bfbd8e985d6ba
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@ package react.router.dom

import web.uievents.MouseEvent

typealias LimitedMouseEvent = MouseEvent
typealias LimitedMouseEvent = MouseEvent<*>
Original file line number Diff line number Diff line change
@@ -15,6 +15,6 @@ import web.window.BeforeUnloadEvent
* `React.useCallback()`.
*/
external fun useBeforeUnload(
callback: (event: BeforeUnloadEvent) -> Any?,
callback: (event: BeforeUnloadEvent<*>) -> Any?,
options: UseBeforeUnloadOptions = definedExternally,
): Unit
)
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ package react.router.dom

import remix.run.router.To
import web.dom.Element
import web.uievents.MouseEvent

/**
* Handles the click behavior for router `<Link>` components. This is useful if
@@ -16,4 +15,4 @@ import web.uievents.MouseEvent
external fun <E : Element /* default is HTMLAnchorElement */> useLinkClickHandler(
to: To,
options: UseLinkClickHandlerOptions = definedExternally,
): (event: react.dom.events.MouseEvent<E, MouseEvent>) -> Unit
): (event: react.dom.events.MouseEvent<E, *>) -> Unit