Files
bmp-website-2026/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts
Sebastian Pachon Araque fea7998835 Initial commit — BMP Website 2026
Vollständiges Redesign mit Gold-Formularen, BMP-Logo, multi-step Forms (Bewerbung, Kontakt, Sponsoring), Netlify-Deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 09:01:20 +02:00

41 lines
1.3 KiB
TypeScript

import * as React from 'react';
type ChangeHandler$1<T> = (state: T) => void;
type SetStateFn<T> = React.Dispatch<React.SetStateAction<T>>;
interface UseControllableStateParams$1<T> {
prop?: T | undefined;
defaultProp: T;
onChange?: ChangeHandler$1<T>;
caller?: string;
}
declare function useControllableState<T>({ prop, defaultProp, onChange, caller, }: UseControllableStateParams$1<T>): [T, SetStateFn<T>];
type ChangeHandler<T> = (state: T) => void;
interface UseControllableStateParams<T> {
prop: T | undefined;
defaultProp: T;
onChange: ChangeHandler<T> | undefined;
caller: string;
}
interface AnyAction {
type: string;
}
declare function useControllableStateReducer<T, S extends {}, A extends AnyAction>(reducer: (prevState: S & {
state: T;
}, action: A) => S & {
state: T;
}, userArgs: UseControllableStateParams<T>, initialState: S): [S & {
state: T;
}, React.Dispatch<A>];
declare function useControllableStateReducer<T, S extends {}, I, A extends AnyAction>(reducer: (prevState: S & {
state: T;
}, action: A) => S & {
state: T;
}, userArgs: UseControllableStateParams<T>, initialArg: I, init: (i: I & {
state: T;
}) => S): [S & {
state: T;
}, React.Dispatch<A>];
export { useControllableState, useControllableStateReducer };