mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Fix optional erroneous types. (#35546)
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
8459d5ed79
commit
49e8085eea
@@ -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();
|
||||
|
||||
Vendored
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user