mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 03:02:04 +08:00
Merge pull request #26185 from karol-majewski/react-router
[react-router] Make definitions work with TypeScript 2.9
This commit is contained in:
2
types/react-router-bootstrap/index.d.ts
vendored
2
types/react-router-bootstrap/index.d.ts
vendored
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/react-bootstrap/react-router-bootstrap
|
||||
// Definitions by: Vincent Lesierse <https://github.com/vlesierse>, Karol Janyst <https://github.com/LKay>, Olmo del Corral <https://github.com/olmobrutall>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
export { default as LinkContainer } from "react-router-bootstrap/lib/LinkContainer"
|
||||
export { default as IndexLinkContainer } from "react-router-bootstrap/lib/IndexLinkContainer"
|
||||
|
||||
2
types/react-router-config/index.d.ts
vendored
2
types/react-router-config/index.d.ts
vendored
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config
|
||||
// Definitions by: François Nguyen <https://github.com/lith-light-g>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from "react";
|
||||
import { RouteComponentProps, match } from "react-router";
|
||||
|
||||
2
types/react-router-dom/index.d.ts
vendored
2
types/react-router-dom/index.d.ts
vendored
@@ -4,7 +4,7 @@
|
||||
// Huy Nguyen <https://github.com/huy-nguyen>
|
||||
// Philip Jackson <https://github.com/p-jackson>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import { match } from "react-router";
|
||||
import * as React from 'react';
|
||||
|
||||
2
types/react-router-native/index.d.ts
vendored
2
types/react-router-native/index.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
// Definitions by: Eduard Zintz <https://github.com/ezintz>
|
||||
// Fernando Helwanger <https://github.com/fhelwanger>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
export {
|
||||
match,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/LeoLeBras/react-router-navigation#readme
|
||||
// Definitions by: Kalle Ott <https://github.com/kaoDev>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
// High-level wrappers
|
||||
import { PureComponent, ReactNode, ComponentClass, ReactElement } from "react";
|
||||
|
||||
2
types/react-router-navigation/index.d.ts
vendored
2
types/react-router-navigation/index.d.ts
vendored
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/LeoLeBras/react-router-navigation#readme
|
||||
// Definitions by: Kalle Ott <https://github.com/kaoDev>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import { Component, ReactNode, ReactElement, ComponentClass } from "react";
|
||||
import { StyleProp, ViewProps, ViewStyle, TextStyle } from "react-native";
|
||||
|
||||
2
types/react-router-param-link/index.d.ts
vendored
2
types/react-router-param-link/index.d.ts
vendored
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/mtsg/react-router-param-link
|
||||
// Definitions by: Motosugi Murata <https://github.com/mtsg>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from "react";
|
||||
import { LinkProps } from "react-router-dom";
|
||||
|
||||
6
types/react-router/index.d.ts
vendored
6
types/react-router/index.d.ts
vendored
@@ -18,7 +18,7 @@
|
||||
// Rahul Raina <https://github.com/rraina>
|
||||
// Maksim Sharipov <https://github.com/pret-a-porter>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from 'react';
|
||||
import * as H from 'history';
|
||||
@@ -106,8 +106,8 @@ export interface match<P> {
|
||||
url: string;
|
||||
}
|
||||
|
||||
// Diff / Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766
|
||||
export type Omit<T, K extends keyof T> = Pick<T, ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never, [x: number]: never })[keyof T]>;
|
||||
// Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
|
||||
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
||||
|
||||
export function matchPath<P>(pathname: string, props: RouteProps): match<P> | null;
|
||||
|
||||
|
||||
2
types/rrc/index.d.ts
vendored
2
types/rrc/index.d.ts
vendored
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/pshrmn/rrc#readme
|
||||
// Definitions by: Deividas Bakanas <https://github.com/DeividasBakanas>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from "react";
|
||||
import * as H from "history";
|
||||
|
||||
Reference in New Issue
Block a user