Skip to content

Commit

Permalink
Merge pull request #722 from ryanlanciaux/updateType
Browse files Browse the repository at this point in the history
Update types
  • Loading branch information
ryanlanciaux committed Aug 18, 2017
2 parents 76ecaeb + 43dd74d commit 7091ad1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"devDependencies": {
"@kadira/storybook": "^2.5.2",
"@types/react": "^15.0.34",
"@types/react-redux": "^5.0.3",
"ava": "^0.17.0",
"babel-cli": "^6.23.0",
"babel-core": "^6.0.0",
Expand Down
11 changes: 11 additions & 0 deletions src/module.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import * as ReactRedux from 'react-redux';

interface PropertyBag<T> {
[propName: string]: T;
Expand Down Expand Up @@ -418,6 +419,16 @@ export namespace utils {
const dataUtils: PropertyBag<Function>;
const rowUtils: PropertyBag<Function>;

// TODO: Not a fan of this but was trying to avoid
// wholesale copying the 11 or so types out of definitely-typed's connect
// not immediately seeing how to say for this thing, just reference their types
function connect(
mapStateToProps?: ReactRedux.MapStateToPropsParam<any, any>,
mapDispatchToProps?: ReactRedux.MapDispatchToPropsParam<any, any>,
mergeProps?: ReactRedux.MergeProps<any, any, any, any>,
options?: ReactRedux.Options
) : ReactRedux.InferableComponentEnhancerWithProps<any, any>;

interface SortProperties{
setSortColumn(sortProperties: ((key : GriddleSortKey) => void)) : void;
sortProperty: GriddleSortKey;
Expand Down
15 changes: 9 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@
webpack-dev-middleware "^1.6.0"
webpack-hot-middleware "^2.13.2"

"@types/react@^15.0.34":
"@types/react-redux@^5.0.3":
version "5.0.3"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-5.0.3.tgz#cd68de0c49c516b940fdc6f688535596b5d6eca4"
dependencies:
"@types/react" "*"
redux "^3.6.0"

"@types/react@*", "@types/react@^15.0.34":
version "15.6.1"
resolved "https://registry.yarnpkg.com/@types/react/-/react-15.6.1.tgz#497f7228762da4432e335957cb34fe9b40f150ae"

Expand Down Expand Up @@ -5207,10 +5214,6 @@ react-modal@^1.2.0, react-modal@^1.2.1:
exenv "1.2.0"
lodash.assign "^4.2.0"

react-redux-custom-store@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/react-redux-custom-store/-/react-redux-custom-store-1.0.0.tgz#dcbf177c73aca546533aff94c65c98d98ce9ba15"

react-redux@^5.0.6:
version "5.0.6"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946"
Expand Down Expand Up @@ -5351,7 +5354,7 @@ reduce-function-call@^1.0.1:
dependencies:
balanced-match "^0.4.2"

redux@^3.5.2:
redux@^3.5.2, redux@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/redux/-/redux-3.6.0.tgz#887c2b3d0b9bd86eca2be70571c27654c19e188d"
dependencies:
Expand Down

0 comments on commit 7091ad1

Please sign in to comment.