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

1.4.9 • Public • Published

Installation

npm install --save @types/redux-first-router-link

Summary

This package contains type definitions for redux-first-router-link (https://github.com/faceyspacey/redux-first-router-link#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/redux-first-router-link.

index.d.ts

import * as React from "react";
import { Location } from "redux-first-router";

export type To = string | string[] | object;

export interface Match<P> {
    params: P;
    isExact: boolean;
    path: string;
    url: string;
}

// Unfortunately we can't pass `HTMLAnchorElement` since the `tagName` attribute allows you to use other tags than anchor.
export interface LinkProps extends React.HTMLAttributes<HTMLElement> {
    to: To;
    redirect?: boolean | undefined;
    replace?: boolean | undefined;
    tagName?: string | undefined;
    down?: boolean | undefined;
    shouldDispatch?: boolean | undefined;
    target?: string | undefined;
    children?: React.ReactNode;
}

export default class Link extends React.Component<LinkProps> {}

export interface NavLinkProps extends LinkProps {
    activeClassName?: string | undefined;
    activeStyle?: React.CSSProperties | undefined;
    ariaCurrent?: string | undefined;
    exact?: boolean | undefined;
    strict?: boolean | undefined;
    children?: React.ReactNode;
    isActive?(match: Match<object>, location: Location): boolean;
}

export class NavLink extends React.Component<NavLinkProps> {}

Additional Details

Credits

These definitions were written by janb87.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/redux-first-router-link

Weekly Downloads

2,923

Version

1.4.9

License

MIT

Unpacked Size

5.17 kB

Total Files

5

Last publish

Collaborators

  • types