mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Merge remote-tracking branch 'upstream/master' into types2.0
Add tsconfig files everywhere # Conflicts: # azure-mobile-services-client/AzureMobileServicesClient.d.ts # bookshelf/bookshelf.d.ts # hapi/hapi.d.ts # helmet/helmet.d.ts # mongodb/mongodb.d.ts # nock/nock.d.ts # react-bootstrap/react-bootstrap.d.ts # react-helmet/react-helmet.d.ts # restify/restify.d.ts # sequelize/sequelize.d.ts
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import * as React from "react"
|
||||
import * as ReactDOM from "react-dom"
|
||||
|
||||
import { browserHistory, hashHistory, Router, Route, IndexRoute, Link } from "react-router"
|
||||
import { browserHistory, hashHistory, createMemoryHistory, Router, Route, IndexRoute, Link } from "react-router"
|
||||
|
||||
interface MasterContext {
|
||||
router: ReactRouter.RouterOnContext;
|
||||
|
||||
12
react-router/react-router.d.ts
vendored
12
react-router/react-router.d.ts
vendored
@@ -86,6 +86,8 @@ declare namespace ReactRouter {
|
||||
const browserHistory: History;
|
||||
const hashHistory: History;
|
||||
|
||||
function createMemoryHistory(options?: H.HistoryOptions): H.History
|
||||
|
||||
/* components */
|
||||
|
||||
interface RouterProps extends React.Props<Router> {
|
||||
@@ -245,7 +247,7 @@ declare namespace ReactRouter {
|
||||
interface MatchArgs {
|
||||
routes?: RouteConfig
|
||||
history?: H.History
|
||||
location?: H.Location
|
||||
location?: H.Location | string
|
||||
parseQueryString?: ParseQueryString
|
||||
stringifyQuery?: StringifyQuery
|
||||
}
|
||||
@@ -412,6 +414,9 @@ declare module "react-router/lib/useRouterHistory" {
|
||||
export default function useRouterHistory<T>(createHistory: HistoryModule.CreateHistory<T>): CreateRouterHistory;
|
||||
}
|
||||
|
||||
declare module "react-router/lib/createMemoryHistory" {
|
||||
export default ReactRouter.createMemoryHistory;
|
||||
}
|
||||
|
||||
declare module "react-router" {
|
||||
|
||||
@@ -453,6 +458,8 @@ declare module "react-router" {
|
||||
|
||||
import useRouterHistory from "react-router/lib/useRouterHistory";
|
||||
|
||||
import createMemoryHistory from "react-router/lib/createMemoryHistory";
|
||||
|
||||
// PlainRoute is defined in the API documented at:
|
||||
// https://github.com/rackt/react-router/blob/master/docs/API.md
|
||||
// but not included in any of the .../lib modules above.
|
||||
@@ -492,7 +499,8 @@ declare module "react-router" {
|
||||
RouterContext,
|
||||
PropTypes,
|
||||
match,
|
||||
useRouterHistory
|
||||
useRouterHistory,
|
||||
createMemoryHistory
|
||||
}
|
||||
|
||||
export default Router
|
||||
|
||||
9
react-router/tsconfig.json
Normal file
9
react-router/tsconfig.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2015",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user