From 7dc075aed57a6fd3a714ecc2fdc3d045a93f7a9e Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 12 Jan 2017 09:36:01 -0800 Subject: [PATCH] Rename `react-router/lib/History.d.ts` to `routerHistory`. (#13642) This prevents global imports of "history" from importing this file on Windows (which is case-insensitive) with classic module resolution (which may resolve global imports in the current directory). --- react-router/index.d.ts | 2 +- react-router/lib/browserHistory.d.ts | 2 +- react-router/lib/hashHistory.d.ts | 2 +- react-router/lib/{History.d.ts => routerHistory.d.ts} | 0 react-router/lib/useRoutes.d.ts | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename react-router/lib/{History.d.ts => routerHistory.d.ts} (100%) diff --git a/react-router/index.d.ts b/react-router/index.d.ts index da7ea7f16e..59f33e1960 100644 --- a/react-router/index.d.ts +++ b/react-router/index.d.ts @@ -20,7 +20,7 @@ import IndexRedirect from "./lib/IndexRedirect"; import IndexRoute from "./lib/IndexRoute"; import Redirect from "./lib/Redirect"; import Route from "./lib/Route"; -import * as History from "./lib/History"; +import * as History from "./lib/routerHistory"; import Lifecycle from "./lib/Lifecycle"; import RouteContext from "./lib/RouteContext"; import browserHistory from "./lib/browserHistory"; diff --git a/react-router/lib/browserHistory.d.ts b/react-router/lib/browserHistory.d.ts index e486255b72..aabbdc23f9 100644 --- a/react-router/lib/browserHistory.d.ts +++ b/react-router/lib/browserHistory.d.ts @@ -1,3 +1,3 @@ -import { History } from './History'; +import { History } from './routerHistory'; declare const browserHistory: History; export default browserHistory; diff --git a/react-router/lib/hashHistory.d.ts b/react-router/lib/hashHistory.d.ts index 34b6f7113d..79f89c2f1a 100644 --- a/react-router/lib/hashHistory.d.ts +++ b/react-router/lib/hashHistory.d.ts @@ -1,3 +1,3 @@ -import { History } from './History'; +import { History } from './routerHistory'; declare const hashHistory: History; export default hashHistory; diff --git a/react-router/lib/History.d.ts b/react-router/lib/routerHistory.d.ts similarity index 100% rename from react-router/lib/History.d.ts rename to react-router/lib/routerHistory.d.ts diff --git a/react-router/lib/useRoutes.d.ts b/react-router/lib/useRoutes.d.ts index 47f47a7c2f..504906431e 100644 --- a/react-router/lib/useRoutes.d.ts +++ b/react-router/lib/useRoutes.d.ts @@ -1,5 +1,5 @@ import * as H from 'history'; -import { HistoryRoutes } from './History'; +import { HistoryRoutes } from './routerHistory'; declare function useRoutes(createHistory: H.CreateHistory): H.CreateHistory; export default useRoutes;