Installation
npm install --save @types/giusto__ink-router
Summary
This package contains type definitions for @giusto/ink-router (https://github.com/lujiajing1126/ink-router).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/giusto__ink-router.
index.d.ts
import { History, Location } from "history";
import { Component, ComponentType, JSX, ReactNode } from "react";
export interface RouterProps {
children: NonNullable<ReactNode>;
initialEntries?:
| Array<
(string | {
pathname: string;
search?: string | undefined;
hash?: string | undefined;
state?: any;
key?: string | undefined;
})
>
| undefined;
initialIndex?: number | undefined;
keyLength?: number | undefined;
getUserConfirmation?: (() => void) | undefined;
}
export class Router extends Component<RouterProps> {}
export interface CommandLineRouterProps {
children: NonNullable<ReactNode>;
args?: string[] | undefined;
options?: Record<string, any> | undefined;
initialEntries?: string[] | undefined;
initialIndex?: number | undefined;
}
export class CommandLineRouter extends Component<CommandLineRouterProps> {}
export interface RouteComponentProps<T extends Record<string, any> = {}> {
match: {
path: string;
params: T;
};
location: Location<{}>;
history: History<{}>;
}
export interface RouteProps {
path: string;
exact?: boolean | undefined;
location?: {
key?: string | undefined;
pathname?: string | undefined;
} | undefined;
component: React.ComponentType<any>;
}
export class Route extends Component<RouteProps> {}
export interface SwitchProps {
children?: React.ReactElement<RouteProps> | Array<React.ReactElement<RouteProps>> | undefined;
notFound?: (() => any) | React.ComponentType<any> | undefined;
}
export class Switch extends Component<SwitchProps> {}
export function withRouter(component: ComponentType<any>): (props: any) => JSX.Element;
Additional Details
- Last updated: Mon, 04 Dec 2023 17:35:44 GMT
- Dependencies: @types/history, @types/react
Credits
These definitions were written by omjadas.