Skip to content

Commit

Permalink
Add optional context prop type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
autarc authored and supasate committed Feb 5, 2019
1 parent 14e7b11 commit 99588bd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
@@ -1,6 +1,7 @@
declare module 'connected-react-router' {
import * as React from 'react';
import { Middleware, Reducer } from 'redux';
import { ReactReduxContextValue } from 'react-redux';
import { match } from 'react-router';
import {
History,
Expand All @@ -12,6 +13,7 @@ declare module 'connected-react-router' {

interface ConnectedRouterProps {
history: History;
context?: React.Context<ReactReduxContextValue>;
}

export type RouterActionType = 'POP' | 'PUSH' | 'REPLACE';
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -45,6 +45,7 @@
"@babel/preset-react": "^7.0.0",
"@types/history": "^4.5.0",
"@types/react": "*",
"@types/react-redux": "^7.0.0",
"@types/react-router": "^4.4.3",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Expand Up @@ -680,6 +680,14 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.7.tgz#c6f1e0d0109ff358b132d98b7b4025c7a7b707c5"
integrity sha512-a6WH0fXkgPNiGIuLjjdpf0n/GnmgWZ4vLuVIJJnDwhmRDPEaiRBcy5ofQPh+EJFua0S1QWmk1745+JqZQGnJ8Q==

"@types/react-redux@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.0.0.tgz#8aaba50fb43739462c40e65e85f96eb8a550d494"
integrity sha512-p5/vXqS4+Gq7EYzNv4SMi/yy7cM/BUbZORlPXY6F8wCyo5EfPa3Gpf6CEQX+UtbK5g2mqgERqVYyutzZYKIpaQ==
dependencies:
"@types/react" "*"
redux "^4.0.0"

"@types/react-router@^4.4.3":
version "4.4.3"
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.4.3.tgz#ea68b4021cb576866f83365b2201411537423d50"
Expand Down

0 comments on commit 99588bd

Please sign in to comment.