From 5c516d012a9d094df062f804ab4b61034282af5c Mon Sep 17 00:00:00 2001 From: Karol Majewski Date: Thu, 31 May 2018 22:10:52 +0200 Subject: [PATCH 1/2] Allow Omit to exclude properties of type other than string The legacy definition doesn't work with TypeScript 2.9. --- types/react-router/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index 32834eed79..5ae92ababc 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -18,7 +18,7 @@ // Rahul Raina // Maksim Sharipov // 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

{ url: string; } -// Diff / Omit taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766 -export type Omit = Pick; +// Omit taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html +export type Omit = Pick>; export function matchPath

(pathname: string, props: RouteProps): match

| null; From 2afd3d4795769f1d1bb75e2eefc1b2d4f33aeb7c Mon Sep 17 00:00:00 2001 From: Karol Majewski Date: Thu, 31 May 2018 23:06:32 +0200 Subject: [PATCH 2/2] Bump up the required version of TypeScript for the consumer libraries --- types/react-router-bootstrap/index.d.ts | 2 +- types/react-router-config/index.d.ts | 2 +- types/react-router-dom/index.d.ts | 2 +- types/react-router-native/index.d.ts | 2 +- types/react-router-navigation-core/index.d.ts | 2 +- types/react-router-navigation/index.d.ts | 2 +- types/react-router-param-link/index.d.ts | 2 +- types/rrc/index.d.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/types/react-router-bootstrap/index.d.ts b/types/react-router-bootstrap/index.d.ts index db2b67d040..ca431d64a0 100644 --- a/types/react-router-bootstrap/index.d.ts +++ b/types/react-router-bootstrap/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-bootstrap/react-router-bootstrap // Definitions by: Vincent Lesierse , Karol Janyst , Olmo del Corral // 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" diff --git a/types/react-router-config/index.d.ts b/types/react-router-config/index.d.ts index deb9d8003d..132b5cc129 100644 --- a/types/react-router-config/index.d.ts +++ b/types/react-router-config/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config // Definitions by: François Nguyen // 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"; diff --git a/types/react-router-dom/index.d.ts b/types/react-router-dom/index.d.ts index 9165f1182e..9870a487b3 100644 --- a/types/react-router-dom/index.d.ts +++ b/types/react-router-dom/index.d.ts @@ -4,7 +4,7 @@ // Huy Nguyen // Philip 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'; diff --git a/types/react-router-native/index.d.ts b/types/react-router-native/index.d.ts index ea2a5f766c..3a450a1209 100644 --- a/types/react-router-native/index.d.ts +++ b/types/react-router-native/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Eduard Zintz // Fernando Helwanger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export { match, diff --git a/types/react-router-navigation-core/index.d.ts b/types/react-router-navigation-core/index.d.ts index 8af7235a94..2bd544da4b 100644 --- a/types/react-router-navigation-core/index.d.ts +++ b/types/react-router-navigation-core/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/LeoLeBras/react-router-navigation#readme // Definitions by: Kalle Ott // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // High-level wrappers import { PureComponent, ReactNode, ComponentClass, ReactElement } from "react"; diff --git a/types/react-router-navigation/index.d.ts b/types/react-router-navigation/index.d.ts index 62258b4b6c..120ffb0d82 100644 --- a/types/react-router-navigation/index.d.ts +++ b/types/react-router-navigation/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/LeoLeBras/react-router-navigation#readme // Definitions by: Kalle Ott // 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"; diff --git a/types/react-router-param-link/index.d.ts b/types/react-router-param-link/index.d.ts index 1b168839f5..5cbec4a27d 100644 --- a/types/react-router-param-link/index.d.ts +++ b/types/react-router-param-link/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mtsg/react-router-param-link // Definitions by: Motosugi Murata // 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"; diff --git a/types/rrc/index.d.ts b/types/rrc/index.d.ts index 3bb04b4ec8..5c5ca85eca 100644 --- a/types/rrc/index.d.ts +++ b/types/rrc/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/pshrmn/rrc#readme // Definitions by: Deividas Bakanas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as H from "history";