refun
- Version 3.1.0
- Published
- 374 kB
- 1 dependency
- MIT license
Install
npm i refun
yarn add refun
pnpm add refun
Overview
A collection of React Hook-enabled functions that compose harmoniously with each other. Similar to `recompose`, but:
Index
Functions
- component()
- generatorIdFactory()
- mapContext()
- mapDebouncedHandlerFactory()
- mapDebouncedHandlerTimeout()
- mapDefaultContext()
- mapDefaultProps()
- mapFocused()
- mapHandlers()
- mapHandlersFactory()
- mapHovered()
- mapKeyboardFocused()
- mapPressed()
- mapProps()
- mapRef()
- mapSafeRequestAnimationFrame()
- mapSafeRequestAnimationFrameFactory()
- mapSafeTimeout()
- mapSafeTimeoutFactory()
- mapState()
- mapStateRef()
- mapThrottledHandlerAnimationFrame()
- mapThrottledHandlerFactory()
- mapThrottledHandlerTimeout()
- mapWithProps()
- mapWithPropsMemo()
- onChange()
- onLayout()
- onUpdate()
- onUpdateAsync()
- pureComponent()
- ReduxDispatchFactory()
- ReduxStateFactory()
- shallowEqualByKeys()
- shallowEquals()
- startWithType()
- StoreContextFactory()
- unwindGenerator()
Interfaces
Type Aliases
Functions
function component
component: { <T1, R>(fn: (p: T1) => R): (Component: FC<R>) => TComponent<T1>; <T1, T2, R>(fn1: (p: T1) => T2, fn2: (p: T2) => R): ( Component: FC<R> ) => TComponent<T1>; <T1, T2, T3, R>(fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => R): ( Component: FC<R> ) => TComponent<T1>; <T1, T2, T3, T4, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => T22, fn22: (p: T22) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => T22, fn22: (p: T22) => T23, fn23: (p: T23) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => T22, fn22: (p: T22) => T23, fn23: (p: T23) => T24, fn24: (p: T24) => R ): (Component: FC<R>) => TComponent<T1>;};
function generatorIdFactory
generatorIdFactory: () => { switchToGenerator: (id: number) => () => void; newId: () => number; isGeneratorRunning: (id: number) => boolean;};
function mapContext
mapContext: <CP extends {}>( context: Context<CP>) => <P extends {}>(props: P) => TExtend<P, CP>;
function mapDebouncedHandlerFactory
mapDebouncedHandlerFactory: ( setFn: Function, clearFn: Function) => <P extends {}>(handlerName: keyof P, ...setFnArgs: any[]) => (props: P) => P;
function mapDebouncedHandlerTimeout
mapDebouncedHandlerTimeout: <P extends {}>( handlerName: keyof P, ...setFnArgs: any[]) => (props: P) => P;
function mapDefaultContext
mapDefaultContext: <CP extends {}>( context: Context<CP>) => <P extends {}>(props: P) => CP & P;
function mapDefaultProps
mapDefaultProps: < P extends {}, K_1 extends Exclude<P extends Record<any, P[any]> ? never : any, undefined>>(defaultProps: { [k in K_1]: Exclude<P[k], undefined> }) => ( props: P) => P & { [k in K_1]: Exclude<P[k], undefined> };
function mapFocused
mapFocused: <P extends TMapFocused>(props: P) => P & Required<TMapFocused>;
function mapHandlers
mapHandlers: <P extends {}, R extends THandlers<P>>( handlers: R) => (props: P) => TExtend<P, TActualHandlers<R>>;
function mapHandlersFactory
mapHandlersFactory: <P extends {}, R extends THandlers<P>>( getHandlers: (props: P) => R) => (props: P) => TExtend<P, TActualHandlers<R>>;
function mapHovered
mapHovered: <P extends TMapHovered>(props: P) => P & Required<TMapHovered>;
function mapKeyboardFocused
mapKeyboardFocused: <P extends TMapKeyboardFocused>( props: P) => P & Required<TMapKeyboardFocused>;
function mapPressed
mapPressed: <P extends TMapPressed>(props: P) => P & Required<TMapPressed>;
function mapProps
mapProps: <P extends {}, R extends {}>( getFn: (props: P) => R) => (props: P) => R;
function mapRef
mapRef: <N extends string, T>( name: N, initialValue: T) => <P extends {}>(props: P) => TExtend<P, { [K in N]: MutableRefObject<T> }>;
function mapSafeRequestAnimationFrame
mapSafeRequestAnimationFrame: <P extends {}, K extends string>( propName: K) => (props: P) => TExtend<P, { [k in K]: TSafeRequestAnimationFrame }>;
function mapSafeRequestAnimationFrameFactory
mapSafeRequestAnimationFrameFactory: ( requestAnimationFrameFn: Function, cancelAnimationFrameFn: Function) => <P extends {}, K extends string>( propName: K) => (props: P) => TExtend<P, { [k in K]: TSafeRequestAnimationFrame }>;
function mapSafeTimeout
mapSafeTimeout: <K extends string>( propName: K) => <P extends {}>(props: P) => TExtend<P, { [k in K]: TSetSafeTimeout }>;
function mapSafeTimeoutFactory
mapSafeTimeoutFactory: ( setTimeoutFn: Function, clearTimeoutFn: Function) => <K extends string>( propName: K) => <P extends {}>(props: P) => TExtend<P, { [k in K]: TSetSafeTimeout }>;
function mapState
mapState: <SN extends string, SSN extends string, P extends {}, R>( stateName: SN, stateSetterName: SSN, getValue: (props: P) => R, watchKeys: (keyof P)[]) => (props: P) => any;
function mapStateRef
mapStateRef: <SN extends string, SSN extends string, P extends {}, R>( stateName: SN, stateFlusherName: SSN, getValue: (props: P) => R, watchKeys: (keyof P)[]) => (props: P) => any;
function mapThrottledHandlerAnimationFrame
mapThrottledHandlerAnimationFrame: <P extends {}>( handlerName: keyof P, ...setFnArgs: any[]) => (props: P) => P;
function mapThrottledHandlerFactory
mapThrottledHandlerFactory: ( setFn: Function, clearFn: Function) => <P extends {}>(handlerName: keyof P, ...setFnArgs: any[]) => (props: P) => P;
function mapThrottledHandlerTimeout
mapThrottledHandlerTimeout: <P extends {}>( handlerName: keyof P, ...setFnArgs: any[]) => (props: P) => P;
function mapWithProps
mapWithProps: <P extends {}, R extends {}>( getFn: (props: P) => R) => (props: P) => TExtend<P, R>;
function mapWithPropsMemo
mapWithPropsMemo: <P extends {}, R extends {}>( getFn: (props: P) => R, watchKeys: (keyof P)[]) => (props: P) => TExtend<P, R>;
function onChange
onChange: <P extends {}>( getFn: (props: P) => Promise<void> | void, watchKeys: (keyof P)[]) => (props: P) => P;
function onLayout
onLayout: <P extends {}>( onLayoutHandler: (props: P) => (() => void) | void, watchKeys: (keyof P)[]) => (props: P) => P;
function onUpdate
onUpdate: <P extends {}>( onUpdateFn: (props: P) => (() => void) | void, watchKeys: (keyof P)[]) => (props: P) => P;
function onUpdateAsync
onUpdateAsync: <P extends {}>( onUpdateFn: (props: RefObject<P>) => GeneratorFactory, watchKeys: (keyof P)[]) => (props: P) => P;
function pureComponent
pureComponent: { <T1, R>(fn: (p: T1) => R): (Component: FC<R>) => TComponent<T1>; <T1, T2, R>(fn1: (p: T1) => T2, fn2: (p: T2) => R): ( Component: FC<R> ) => TComponent<T1>; <T1, T2, T3, R>(fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => R): ( Component: FC<R> ) => TComponent<T1>; <T1, T2, T3, T4, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => R ): (Component: FC<R>) => TComponent<T1>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R>( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => T22, fn22: (p: T22) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => T22, fn22: (p: T22) => T23, fn23: (p: T23) => R ): (Component: FC<R>) => TComponent<T1>; < T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, R >( fn1: (p: T1) => T2, fn2: (p: T2) => T3, fn3: (p: T3) => T4, fn4: (p: T4) => T5, fn5: (p: T5) => T6, fn6: (p: T6) => T7, fn7: (p: T7) => T8, fn8: (p: T8) => T9, fn9: (p: T9) => T10, fn10: (p: T10) => T11, fn11: (p: T11) => T12, fn12: (p: T12) => T13, fn13: (p: T13) => T14, fn14: (p: T14) => T15, fn15: (p: T15) => T16, fn16: (p: T16) => T17, fn17: (p: T17) => T18, fn18: (p: T18) => T19, fn19: (p: T19) => T20, fn20: (p: T20) => T21, fn21: (p: T21) => T22, fn22: (p: T22) => T23, fn23: (p: T23) => T24, fn24: (p: T24) => R ): (Component: FC<R>) => TComponent<T1>;};
function ReduxDispatchFactory
ReduxDispatchFactory: <STORE extends Store<any, any>>( context: Context<STORE>) => <K extends string>( dispatchName: K) => <P extends {}>(props: P) => TExtend<P, { [k in K]: STORE['dispatch'] }>;
function ReduxStateFactory
ReduxStateFactory: <S>( context: Context<Store<S, any>>) => <P extends {}, SP extends {}>( mapStateToProps: (state: S) => SP, stateKeysToWatch: (keyof S)[]) => (props: P) => TExtend<P, SP>;
function shallowEqualByKeys
shallowEqualByKeys: <T extends {}>(a: T, b: T, keys: (keyof T)[]) => boolean;
function shallowEquals
shallowEquals: <T extends {}>(a: T, b: T) => boolean;
function startWithType
startWithType: <P extends {}>() => (props: P) => P;
function StoreContextFactory
StoreContextFactory: <STORE extends Store<any, any>>( store: STORE) => { Context: any; mapStoreState: <P extends {}, SP extends {}>( mapStateToProps: (state: ReturnType<STORE['getState']>) => SP, stateKeysToWatch: (keyof ReturnType<STORE['getState']>)[] ) => (props: P) => any; mapStoreDispatch: <K extends string>( dispatchName: K ) => <P_1 extends {}>(props: P_1) => any;};
function unwindGenerator
unwindGenerator: <T>( gen: Generator<Promise<T>, void, T>, shouldContinue: () => boolean) => void;
Interfaces
interface TComponent
interface TComponent<T> extends FC<T> {}
index signature
[k: string]: any;
Type Aliases
type TActualHandlers
type TActualHandlers<T> = { [key in keyof T]: (...args: any[]) => void;};
type THandlers
type THandlers<P> = { [key: string]: (props: P) => (...args: any[]) => void;};
type TMapFocused
type TMapFocused = { isFocused?: boolean; onFocus?: () => void; onBlur?: () => void;};
type TMapHovered
type TMapHovered = { isHovered?: boolean; onPointerEnter?: () => void; onPointerLeave?: () => void;};
type TMapKeyboardFocused
type TMapKeyboardFocused = { isKeyboardFocused?: boolean; onFocus?: () => void; onBlur?: () => void; onPressIn?: () => void; onPressOut?: () => void;};
type TMapPressed
type TMapPressed = { isPressed?: boolean; onPressIn?: () => void; onPressOut?: () => void;};
type TSafeRequestAnimationFrame
type TSafeRequestAnimationFrame = (cb: () => void) => () => void;
type TSetSafeTimeout
type TSetSafeTimeout = (cb: () => void, delay: number) => () => void;
Package Files (31)
- types/component.d.ts
- types/index.d.ts
- types/map-context.d.ts
- types/map-debounced-handler.d.ts
- types/map-default-context.d.ts
- types/map-default-props.d.ts
- types/map-focused.d.ts
- types/map-handlers-factory.d.ts
- types/map-handlers.d.ts
- types/map-hovered.d.ts
- types/map-keyboard-focused.d.ts
- types/map-pressed.d.ts
- types/map-props.d.ts
- types/map-ref.d.ts
- types/map-safe-request-animation-frame.d.ts
- types/map-safe-timeout.d.ts
- types/map-state-ref.d.ts
- types/map-state.d.ts
- types/map-throttled-handler.d.ts
- types/map-with-props-memo.d.ts
- types/map-with-props.d.ts
- types/on-change.d.ts
- types/on-layout.d.ts
- types/on-update-async.d.ts
- types/on-update.d.ts
- types/pure-component.d.ts
- types/redux-dispatch-factory.d.ts
- types/redux-state-factory.d.ts
- types/start-with-type.d.ts
- types/store-context-factory.d.ts
- types/utils.d.ts
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/refun
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/refun)
- HTML<a href="https://www.jsdocs.io/package/refun"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 8909 ms. - Missing or incorrect documentation? Open an issue for this package.