Skip to content

Commit

Permalink
Add type definitions to router onLoadEnd and onLoadStart (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-cz authored Mar 9, 2021
1 parent 2102ffb commit 0833c4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/curvy-suns-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'preact-iso': patch
---

Add type definitions to router onLoadEnd and onLoadStart
2 changes: 1 addition & 1 deletion packages/preact-iso/router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { FunctionComponent, VNode } from 'preact';

export const LocationProvider: FunctionComponent;

export function Router(props: { onLoadEnd?: () => void; onLoadStart?: () => void; children?: VNode[] }): VNode;
export function Router(props: { onLoadEnd?: (url: string) => void; onLoadStart?: (url: string) => void; children?: VNode[] }): VNode;

interface LocationHook {
url: string;
Expand Down

0 comments on commit 0833c4a

Please sign in to comment.