added typings for mapPropsStreamWithConfig and componentFromStreamWithConfig

This commit is contained in:
Samuel DeSota
2017-05-18 14:44:55 -04:00
parent 6b64c4f2a1
commit b7612018f2
2 changed files with 10 additions and 1 deletions

View File

@@ -255,11 +255,21 @@ declare module 'recompose' {
propsToReactNode: mapper<Subscribable<TProps>, Subscribable<React.ReactNode>>
): Component<TProps>; // ???
// componentFromStreamWithConfig: https://github.com/acdlite/recompose/blob/master/docs/API.md#componentfromstreamwithconfig
export function componentFromStreamWithConfig<TProps>(config: ObservableConfig): (
propsToReactNode: mapper<Subscribable<TProps>, Subscribable<React.ReactNode>>
) => Component<TProps>
// mapPropsStream: https://github.com/acdlite/recompose/blob/master/docs/API.md#mapPropsStream
export function mapPropsStream<TInner, TOutter>(
transform: mapper<Subscribable<TOutter>, Subscribable<TInner>>
): ComponentEnhancer<TInner, TOutter>;
// mapPropsStreamWithConfig: https://github.com/acdlite/recompose/blob/master/docs/API.md#mappropsstreamwithconfig
export function mapPropsStreamWithConfig<TInner, TOutter>(config: ObservableConfig): (
transform: mapper<Subscribable<TOutter>, Subscribable<TInner>>
) => ComponentEnhancer<TInner, TOutter>;
// createEventHandler: https://github.com/acdlite/recompose/blob/master/docs/API.md#createEventHandler
type EventHandlerOf<T, TSubs extends Subscribable<T>> = {
handler: (value: T) => void;

View File

@@ -178,4 +178,3 @@ function testRenderComponent() {
const enhancer = renderComponent(() => <span>Nop!</span>);
const enhanced: React.ComponentClass<OutterProps> = enhancer(innerComponent);
}