@airplane/views
Version:
A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.
19 lines (18 loc) • 913 B
TypeScript
import { DefaultParams, ParamValues } from "../../client";
import { ExecuteError } from "../../components/query";
import { TaskQuery } from "../../components/query";
export type LatestRun = {
runID?: string;
output?: any;
error?: ExecuteError;
};
export declare const LatestRunDetails: ({ runID, output, error }: LatestRun) => import("react/jsx-runtime").JSX.Element;
export type SetLatestRunProps = {
setLatestRun?: (run?: LatestRun) => void;
};
/**
* useSetLatestRunInTaskQuery is a hook that sets the latest run ID in a task's
* onSuccess and onError. Used internally to get run information in a
* task-backed component's error boundary.
*/
export declare const useSetLatestRunInTaskQuery: <TParams extends ParamValues | undefined = DefaultParams>(task: TaskQuery<TParams>, setLatestRun?: ((run: LatestRun) => void) | undefined) => import("../../components/query").FullQuery<TParams, any>;