diff --git a/packages/kit/src/exports/index.js b/packages/kit/src/exports/index.js index 4d2bb75223f3..e587ede88581 100644 --- a/packages/kit/src/exports/index.js +++ b/packages/kit/src/exports/index.js @@ -180,14 +180,14 @@ export function text(body, init) { } /** - * Create an `ActionFailure` object. + * Create an `ActionFailure` object. Call when form submission fails. * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. * @overload * @param {number} status * @returns {import('./public.js').ActionFailure} */ /** - * Create an `ActionFailure` object. + * Create an `ActionFailure` object. Call when form submission fails. * @template {Record | undefined} [T=undefined] * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. * @param {T} data Data associated with the failure (e.g. validation errors) @@ -197,7 +197,7 @@ export function text(body, init) { * @returns {import('./public.js').ActionFailure} */ /** - * Create an `ActionFailure` object. + * Create an `ActionFailure` object. Call when form submission fails. * @param {number} status * @param {any} [data] * @returns {import('./public.js').ActionFailure} diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index b87d7007cc98..30ac9392314e 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -2001,12 +2001,12 @@ declare module '@sveltejs/kit' { */ export function text(body: string, init?: ResponseInit | undefined): Response; /** - * Create an `ActionFailure` object. + * Create an `ActionFailure` object. Call when form submission fails. * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. * */ export function fail(status: number): ActionFailure; /** - * Create an `ActionFailure` object. + * Create an `ActionFailure` object. Call when form submission fails. * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. * @param data Data associated with the failure (e.g. validation errors) * */