// Type definitions for react-side-effect 1.1 // Project: https://github.com/gaearon/react-side-effect // Definitions by: Remo H. Jansen // Martin Charles // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from "react"; interface WithSideEffect { ( reducePropsToState: (propsList: TProp[]) => TState, handleStateChangeOnClient: (state: TState) => void ): ClassDecorator; ( reducePropsToState: (propsList: TProp[]) => TState, handleStateChangeOnClient: (state: TState) => void, mapStateOnServer: (state: TState) => TServerState ): ClassDecorator; } declare const withSideEffect: WithSideEffect; type ClassDecorator = ( component: React.ComponentType ) => React.ComponentType & { peek: () => TPeek; rewind: () => TRewind; }; declare namespace withSideEffect {} // https://github.com/Microsoft/TypeScript/issues/5073 export = withSideEffect;