@tolokoban/ui
Version:
React components with theme
22 lines • 1.42 kB
TypeScript
import React from "react";
/**
* If an exception occurs during this effect, it can be caugth by a Error Boundary.
* With `useEffect()` such exceptions will just be silent.
*/
export declare function useThrowableCallback<TArgs extends unknown[]>(callback: (...args: TArgs) => void, dependencies: React.DependencyList, errorMessage?: string | (() => string)): (...args: TArgs) => void;
/**
* If an exception occurs during this effect, it can be caugth by a Error Boundary.
* With `useEffect()` such exceptions will just be silent.
*/
export declare function useThrowableAsyncCallback<TArgs extends unknown[]>(callback: (...args: TArgs) => Promise<void>, dependencies: React.DependencyList, errorMessage?: string | (() => string)): (...args: TArgs) => void;
/**
* If an exception occurs during this effect, it can be caugth by a Error Boundary.
* With `useEffect()` such exceptions will just be silent.
*/
export declare function useThrowableEffect(action: React.EffectCallback, dependencies?: React.DependencyList, errorMessage?: string | (() => string)): void;
/**
* If an exception occurs during this effect, it can be caugth by a Error Boundary.
* With `useEffect()` such exceptions will just be silent.
*/
export declare function useThrowableAsyncEffect(action: () => Promise<void>, dependencies?: React.DependencyList, errorMessage?: string | (() => string)): void;
//# sourceMappingURL=throwable.d.ts.map