diff --git a/types/hookrouter/hookrouter-tests.ts b/types/hookrouter/hookrouter-tests.ts index 534f374932..4830d209d8 100644 --- a/types/hookrouter/hookrouter-tests.ts +++ b/types/hookrouter/hookrouter-tests.ts @@ -18,7 +18,6 @@ import { prepareRoute, useQueryParams } from 'hookrouter'; -import * as React from 'react'; // $ExpectType AProps setLinkProps({ href: '/route' }); @@ -74,8 +73,5 @@ usePath(true, true); // $ExpectType string getWorkingPath('id'); -// $ExpectType ReactNode -useRoutes({ '/route:id': ({ id }) => React.createElement('div', { children: 'Route Component' }) }); - // $ExpectType string getTitle(); diff --git a/types/hookrouter/index.d.ts b/types/hookrouter/index.d.ts index 9076efa8df..c326745f95 100644 --- a/types/hookrouter/index.d.ts +++ b/types/hookrouter/index.d.ts @@ -42,7 +42,7 @@ export function resolvePath(inPath: string): string; export function prepareRoute(inRoute: string): [RegExp, string[]]; export function navigate( url: string, - replace: true, + replace?: boolean, queryParams?: HookRouter.QueryParams | null, replaceQueryParams?: boolean ): void; @@ -51,6 +51,6 @@ export function getPath(): string; export function usePath(active?: boolean, withBasePath?: boolean): string; export function updatePathHooks(): void; export function getWorkingPath(parentRouterId: string): string; -export function useRoutes(routeObj: HookRouter.RouteObject): React.ReactNode; +export function useRoutes(routeObj: HookRouter.RouteObject): any; export function useTitle(inString: string): void; export function getTitle(): string;