@types/giusto__ink-router
TypeScript icon, indicating that this package has built-in type declarations

2.4.8 • Public • Published

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

Credits

These definitions were written by omjadas.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/giusto__ink-router

Weekly Downloads

7

Version

2.4.8

License

MIT

Unpacked Size

6.39 kB

Total Files

5

Last publish

Collaborators

  • types