@copilotkit/react-core
Version:
<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />
12 lines (9 loc) • 581 B
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { useCallback } from 'react';
import { GraphQLError } from '@copilotkit/runtime-client-gql';
declare function ErrorToast({ errors }: {
errors: (Error | GraphQLError)[];
}): react_jsx_runtime.JSX.Element;
declare function useErrorToast(): (error: (Error | GraphQLError)[]) => void;
declare function useAsyncCallback<T extends (...args: any[]) => Promise<any>>(callback: T, deps: Parameters<typeof useCallback>[1]): (...args: Parameters<T>) => Promise<any>;
export { ErrorToast, useAsyncCallback, useErrorToast };