@real-router/preact 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ import { useIsActiveRoute } from "../hooks/useIsActiveRoute";
12
12
  import { useRouter } from "../hooks/useRouter";
13
13
 
14
14
  import type { LinkProps } from "../types";
15
- import type { FunctionComponent, JSX } from "preact";
15
+ import type { FunctionComponent, TargetedMouseEvent } from "preact";
16
16
 
17
17
  /**
18
18
  * Custom comparator for `Link`'s `memo()` wrapper.
@@ -95,9 +95,7 @@ export const Link: FunctionComponent<LinkProps> = memo(
95
95
  hash === undefined ? undefined : { hash },
96
96
  );
97
97
 
98
- const handleClick = (
99
- evt: JSX.TargetedMouseEvent<HTMLAnchorElement>,
100
- ): void => {
98
+ const handleClick = (evt: TargetedMouseEvent<HTMLAnchorElement>): void => {
101
99
  if (onClick) {
102
100
  onClick(evt);
103
101
 
package/src/types.ts CHANGED
@@ -4,7 +4,7 @@ import type {
4
4
  Navigator,
5
5
  State,
6
6
  } from "@real-router/core";
7
- import type { JSX } from "preact";
7
+ import type { HTMLAttributes } from "preact";
8
8
 
9
9
  export interface RouteState<P extends Params = Params> {
10
10
  route: State<P> | undefined;
@@ -16,7 +16,7 @@ export type RouteContext<P extends Params = Params> = {
16
16
  } & RouteState<P>;
17
17
 
18
18
  export interface LinkProps<P extends Params = Params> extends Omit<
19
- JSX.HTMLAttributes<HTMLAnchorElement>,
19
+ HTMLAttributes<HTMLAnchorElement>,
20
20
  "className"
21
21
  > {
22
22
  routeName: string;