fuma 0.3.41 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ export declare function formAction<E extends RequestEvent, Shape extends z.ZodRa
|
|
|
6
6
|
formData: FormData;
|
|
7
7
|
}) => Promise<ReturnType>, options?: {
|
|
8
8
|
validation?: z.SuperRefinement<z.objectOutputType<Shape, z.ZodTypeAny>>;
|
|
9
|
-
redirectTo?: string | ((res: ReturnType) => string);
|
|
9
|
+
redirectTo?: string | URL | ((res: ReturnType) => string | URL | undefined);
|
|
10
10
|
}): (event: E) => Promise<import("@sveltejs/kit").ActionFailure<{
|
|
11
11
|
message: string;
|
|
12
12
|
} | {
|
package/dist/server/try.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type ActionFailure } from '@sveltejs/kit';
|
|
|
2
2
|
import type { Issue } from './parseFormData.js';
|
|
3
3
|
export declare function tryOrFail<T = unknown>(func: () => Promise<T>,
|
|
4
4
|
/** You can redirect on success */
|
|
5
|
-
redirectTo?: string | ((res: T) => string | undefined)): Promise<T | ActionFailure<{
|
|
5
|
+
redirectTo?: string | URL | ((res: T) => string | URL | undefined)): Promise<T | ActionFailure<{
|
|
6
6
|
message: string;
|
|
7
7
|
} | {
|
|
8
8
|
issues: Issue[];
|
package/dist/server/try.js
CHANGED