Commit Graph

46 Commits

Author SHA1 Message Date
Arthur Ozga
e1bd6ce33a Merge pull request #19666 from NicholasBoll/fix/react-redux-map-factories
[react-redux] Fix map factories
2017-09-14 15:31:56 -07:00
Arthur Ozga
0c29ad74db Merge pull request #19654 from zspitz/activex-libreoffice
activex-libreoffice: initial commit
2017-09-14 14:06:43 -07:00
Arthur Ozga
f1ecd79635 Merge pull request #19672 from alecmerdler/react-redux-wrappedcomponent
[react-redux] Add missing WrappedComponent
2017-09-14 13:01:26 -07:00
Alec Merdler
5e673b9dfa added test for WrappedComponent 2017-09-12 10:51:51 -04:00
Alec Merdler
556d60bc17 added WrappedComponent to return type of InferableComponentEnhancerWithProps 2017-09-11 10:29:58 -04:00
Nicholas Boll
1cc622c196 [react-redux] Updated version 2017-09-11 00:32:24 -06:00
Nicholas Boll
23d6b6b42c [react-redux] Added contributor 2017-09-11 00:26:57 -06:00
Nicholas Boll
f1dce7be19 [react-redux] Fix map factories
* Changed the order of factory vs object in mapping functions so TS picks the right one
* Added test cases and test style
2017-09-11 00:21:31 -06:00
Zev Spitz
aa32efdbad Merge branch 'master' into activex-libreoffice 2017-09-11 08:19:51 +03:00
Zev Spitz
4319f2ed28 Merge upstream changes (#3) 2017-09-10 08:44:56 +03:00
Frank Tan
e8222e83c4 Revert "Merge pull request #19378 from tansongyang/master"
This reverts commit a7dcec2bb2, reversing
changes made to f4711be54c.
2017-09-09 14:53:11 -04:00
Nathan Shively-Sanders
a7dcec2bb2 Merge pull request #19378 from tansongyang/master
[react-redux] Give `connect` default types
2017-09-05 16:00:40 -07:00
Andy
0537c1fb27 Add "private": true to every package.json (#19483) 2017-08-31 08:02:56 -07:00
Frank Tan
5677208b59 [react-redux] Fix incorrect change in connect.
Accidentally removed {} in 3rd generic position and turned this into a 3-arity version vs the original 4-arity.
2017-08-29 11:28:29 -04:00
Frank Tan
15e604f2f3 [react-redux] Make connect input types optional
For convenience.
2017-08-27 16:11:16 -04:00
Sean Kelley
1e00ae550b Remove myself as maintainer of react-redux (again).
#18801
2017-08-22 12:35:57 -07:00
Marco Buono
b7486f2c4d react-redux: fix dispatchToProps as object
This fixes the resulting wrapped component type returned by
the connect HOC when the `dispatchToProps` argument is an object. (Fixes
issue #18955)

Previously we were using `MapDispatchToPropsObject` but that doesn't
work with `Omit<T, K>`, so dispatch props were being preserved on the
resulting object. I've replaced that with `TDispatchProps` instead.

I've added test code by @horiuchi, adapted from:
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18955
2017-08-18 21:06:54 -03:00
Daniel Rosenwasser
b71c0e48ac Merge pull request #18984 from coreh/patch-1
react-redux: Make dispatch property optional in DispatchProp<S>
2017-08-16 13:25:05 -07:00
Daniel Rosenwasser
0e9358b5b2 Merge pull request #18951 from dannycochran/patch-7
update react-redux connect options
2017-08-16 11:00:44 -07:00
Danny Cochran
d38522bd72 make default arguments {} instead of any 2017-08-15 12:47:50 -07:00
Marco Buono
53266428eb react-redux: Add test for optional dispatch prop 2017-08-15 14:53:42 -03:00
Marco Aurélio
b68c87fee6 react-redux: Make dispatch property optional
That way the function returned by `connect()` (when no `mapDispatchToProps` function is specified) can also take React classes that don't have a `dispatch` prop declared. (But we get to keep the type checking for the classes that do)
2017-08-15 12:53:34 -03:00
Danny Cochran
2da9431df1 Make all arguments for Options optional
next-redux-wrapper uses Options -- a separate PR can add arguments there.
2017-08-15 07:47:06 -07:00
Frank Tan
eaea12959d [react-redux] Do not mark ownProps as optional
According to docs, "it's always legal to provide a callback that accepts fewer arguments": https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#optional-parameters-in-callbacks

Morever, react-redux docs say that ownProps will have a value when it is specified as a callback argument: https://github.com/reactjs/react-redux/blob/master/docs/api.md#the-arity-of-mapstatetoprops-and-mapdispatchtoprops-determines-whether-they-receive-ownprops
2017-08-15 10:13:01 -04:00
Danny Cochran
3342c4d879 remove trailing white space 2017-08-14 17:55:53 -07:00
Danny Cochran
0380922eb5 update react-redux connect options
The existing Options had a redundant "withRef" parameter (it was already inheriting from ConnectOptions), and were missing some helper functions for diffing state and props:

fd81f1812c/docs/api.md (arguments)
2017-08-14 17:52:23 -07:00
Curtis Layne
9a3c424109 [react-redux] Update types for react-redux (#18510)
The types were failing to remove props they injected from requirements
for the parents rendering them. By using Omit we can omit props that are
injected from the connect component so that we don't get errors during
parent rendering.

All of this is done through type inference so that end users don't have
to be aware that this is happening.
2017-08-14 12:09:47 -07:00
Sean Kelley
24a2b58a34 Remove myself as a maintainer of react-redux. (#18801) 2017-08-10 16:34:50 -07:00
Kenzie Togami
31996672cf [react-redux] Add connectAdvanced from v5 (#18488) 2017-08-08 12:20:49 -07:00
Zev Spitz
c5f8572905 Merge commits from origin (#1) 2017-07-28 02:06:59 +03:00
Artem Malko
7353fa8519 [react-redux] Fix types for react-redux for connect without dispatchToProps (#18334)
* Fix types for react-redux for connect without dispatchToProps

* return typescript version
2017-07-24 11:46:06 -07:00
Alex
0a0270a40b fix error TS2314
Generic type 'Component<P, S>' requires 2 type argument(s).
2017-07-10 09:37:07 +03:00
Tanguy Krotoff
573083a518 Replace React.Component<(any|void|\{\}|null)> by React.Component
+ many manual adjustments
2017-06-21 09:48:37 +02:00
Tanguy Krotoff
ea9de8a518 Replace React.Component<(.*), (any|void|\{\}|null)> by React.Component<$1>
+ many manual adjustments
2017-06-19 13:35:50 +02:00
Tanguy Krotoff
eeb262e1d8 Update react to TypeScript 2.3 2017-06-19 13:34:54 +02:00
Blake Embrey
a6087cff80 Explicitly enable inference with connect() 2017-06-14 18:54:34 -04:00
Blake Embrey
f527af6ed3 Annotate react-redux more explicitly 2017-06-05 16:09:30 -04:00
Nathan Shively-Sanders
163f4438df Fix weak type errors (#16845)
* Fix first round of weak type errors

Done through griddle-react

* 95% done with weak type fixes

* Fix last couple of weak type errors

* Remove some lint from mithril tests

* mithril's Lifecycle is not a weak type any more

Restore the Lifecycle constraints in the rest of the definitions.

* Fix react-redux tests after #16652 broke them

* Remove package-lock.json
2017-06-04 22:03:03 -07:00
Blake Embrey
2bc7feeb48 [react-redux] Expose dispatch with props (#16652) 2017-06-02 07:19:38 -07:00
Thomas Hasner
10a204d02d Add overloads to account for mergeProps (#16024)
* Add overloads to account for `mergeProps`

This also provides better typings for users of `strictNullChecks`

* more overloads and tests

* accept `null | undefined`

* allow placeholder typings

* tests

* one `ComponentDecorator`

* tests

* no keyword
2017-04-26 11:52:32 -07:00
Yui
a34f72687e Merge pull request #15993 from DefinitelyTyped/react-redux
react-redux: Remove test which does not compile in TypeScript 2.3
2017-04-25 14:54:20 -07:00
Andy Hanson
6cf0462819 react-redux: Remove test which does not compile in TypeScript 2.3 2017-04-19 10:23:24 -07:00
Thomas Hasner
416c0f9c3d Use TOwnProps instead of IOwnProps 2017-04-18 13:51:36 -04:00
Tom Hasner
5f03934940 fix 2017-04-17 22:57:58 -04:00
Thomas Hasner
52371a816d ComponentDecorator input accepts TOwnProps 2017-04-17 21:53:18 -04:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00