Installation
npm install --save @types/react-hooks-helper
Summary
This package contains type definitions for react-hooks-helper (https://github.com/revelcw/react-hooks-helper#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-hooks-helper.
index.d.ts
/// <reference types="react"/>
export as namespace ReactHooksHelper;
export interface NavigationProps {
next: () => void;
previous?: (() => void) | undefined;
go?: ((step: number | string) => void) | undefined;
play?: (() => void) | undefined;
pause?: (() => void) | undefined;
}
export interface Step {
id: string;
}
export interface UseStepParams {
initialStep?: number | undefined;
autoAdvanceDuration?: number | undefined;
steps: Step[] | number;
}
export interface UseStepResponse {
autoAdvanceDuration: number;
isPaused: boolean;
index: number;
step: Step | number;
navigation: NavigationProps;
}
export function useStep(params: UseStepParams): UseStepResponse;
export interface FormTarget {
target: {
name: string; // object property name or Dot separated when hierarchical
value: any;
type?: string | undefined;
checked?: boolean | undefined;
};
}
export type SetForm = (
event: React.SyntheticEvent<HTMLInputElement> | React.ChangeEvent<HTMLInputElement> | FormTarget,
) => void;
export function useForm<T>(defaultFormConfig: T): [T, SetForm];
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/react
Credits
These definitions were written by Joao Edmundo.