Commit Graph

19 Commits

Author SHA1 Message Date
Andy Chou
6031cbb0ca Add typing for Recompose createEventHandlerWithConfig(), which will be exported. See https://github.com/acdlite/recompose/pull/522 (#19921) 2017-09-26 14:10:57 +09:00
Frank Tan
6cdcdd65e7 [recompose] Add generic onlyUpdateForKeys (#19440)
Adds an overload for `onlyUpdateForKeys` that allows a generic parameter for the component props type. This allows us to use `keyof` to provide type checking on the property names.
2017-08-30 17:22:13 -07:00
doomsower
3e4c511f7f Added withStateHandlers (#18781) 2017-08-14 11:59:23 -07:00
Curtis Layne
b6cb635c6e [recompose] Fixes many serious issues with recompose types (#18496)
The current iteration of recompose types have two issues:

1) Only a handful of HOCs infer required props from their children.
2) Even when an HOC does infer props from its children, it does not remove
requirements for props it injects.

This leads to the parent component rendering a wrapped commponent to not
realize that props an HOC is injecting have already been handled and
leads to a lot of typing issues.

This PR updates a lot of the types to infer injected types and remove /
partial them from the required props list that are passed to their
parent.

Due to a couple of typing issues in the TS language itself there are
some missing pieces, namely compose cannot currently be typed. This PR,
however, makes huge strides in correcting and inferring types in recompose.
2017-07-31 13:48:04 -07:00
Ciarán Curley
e525932a5b
Rewrote again to match observable found in componentFromStream 2017-07-10 17:35:23 +01:00
Ciarán Curley
d58e9e015a
Fix CI Fail; forgot Ctrl-S on my end 2017-07-10 16:45:11 +01:00
Ciarán Curley
7db3bd0d08
Was able to simplfy things 2017-07-10 16:29:21 +01:00
Ciarán Curley
9ef6dc6a7b
Flesh out Subscriable type to better match ES Observable spec 2017-07-10 13:08:29 +01:00
Kanchalai Tanglertsampan
2bdb5749a2 Remove unuse import 2017-06-22 16:52:50 -07:00
Kanchalai Tanglertsampan
5f329049a0 Fix breaking change from co-vairant parameter call back 2017-06-22 16:51:57 -07:00
Tanguy Krotoff
eeb262e1d8 Update react to TypeScript 2.3 2017-06-19 13:34:54 +02: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
Andy Hanson
db3d6deb3e Merge branch 'recompose-mapPropsStream' of https://github.com/mrapogee/DefinitelyTyped into mrapogee-recompose-mapPropsStream 2017-06-02 06:45:18 -07:00
shane
a3ea32c6a8 Added spacing 2017-05-22 17:17:58 +10:00
Samuel DeSota
9eea1e8a91 added to defs by, changed generic position, and added defs by 2017-05-18 14:53:04 -04:00
Samuel DeSota
b7612018f2 added typings for mapPropsStreamWithConfig and componentFromStreamWithConfig 2017-05-18 14:44:55 -04:00
shane
07ba4da3c5 Bumped version number 2017-04-28 16:37:04 +10:00
shane
9d3a210b05 Improve lifecycle this typing 2017-04-28 16:20:06 +10:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00