tsx
const [actingconst acting: {
pending: boolean;
input?: void | undefined;
result?: void | undefined;
error?: any;
clear: () => void;
retry: () => void;
}
, actconst act: ((vars: void) => Promise<void>) & {
Form: never;
url: string;
}
] = createServerAction$(alias) createServerAction$<void, void>(fn: (arg1: void, event: ActionEvent) => Promise<void>, options?: {
invalidate?: string | any[] | ((r: Response) => string | void | any[]) | undefined;
} | undefined): RouteAction<...> (+1 overload)
import createServerAction$
(async (args) => { // do something
})
tsx
const [actingconst acting: {
pending: boolean;
input?: void | undefined;
result?: void | undefined;
error?: any;
clear: () => void;
retry: () => void;
}
, actconst act: ((vars: void) => Promise<void>) & {
Form: never;
url: string;
}
] = createServerAction$(alias) createServerAction$<void, void>(fn: (arg1: void, event: ActionEvent) => Promise<void>, options?: {
invalidate?: string | any[] | ((r: Response) => string | void | any[]) | undefined;
} | undefined): RouteAction<...> (+1 overload)
import createServerAction$
(async (args) => { // do something
})