2.4.8 • Published 2 years ago

@types/giusto__ink-router v2.4.8

Weekly downloads
24
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for @giusto/ink-router 2.4
// Project: https://github.com/lujiajing1126/ink-router
// Definitions by: omjadas <https://github.com/omjadas>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import { History, Location } from "history";
import { Component, ComponentType, 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.

2.4.8

2 years ago

2.4.5

2 years ago

2.4.7

2 years ago

2.4.6

2 years ago

2.4.4

3 years ago

2.4.3

4 years ago

2.4.2

4 years ago

2.4.1

5 years ago

2.4.0

5 years ago