@sveltejs/kit 1.0.0-next.474 → 1.0.0-next.475
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.
package/package.json
CHANGED
|
@@ -147,7 +147,7 @@ export function get_default_build_config({ config, input, ssr, outDir }) {
|
|
|
147
147
|
* @returns {string}
|
|
148
148
|
*/
|
|
149
149
|
export function assets_base(config) {
|
|
150
|
-
return config.paths.assets || config.paths.base || './';
|
|
150
|
+
return config.paths.assets + '/' || config.paths.base + '/' || './';
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
const method_names = new Set(['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH']);
|
package/types/ambient.d.ts
CHANGED
|
@@ -88,6 +88,15 @@ declare module '$app/environment' {
|
|
|
88
88
|
declare module '$app/forms' {
|
|
89
89
|
import type { ActionResult } from '@sveltejs/kit';
|
|
90
90
|
|
|
91
|
+
export type SubmitFunction<
|
|
92
|
+
Success extends Record<string, unknown> | undefined,
|
|
93
|
+
Invalid extends Record<string, unknown> | undefined
|
|
94
|
+
> = (input: {
|
|
95
|
+
data: FormData;
|
|
96
|
+
form: HTMLFormElement;
|
|
97
|
+
cancel: () => void;
|
|
98
|
+
}) => void | ((result: ActionResult<Success, Invalid>) => void);
|
|
99
|
+
|
|
91
100
|
/**
|
|
92
101
|
* This action enhances a `<form>` element that otherwise would work without JavaScript.
|
|
93
102
|
* @param form The form element
|
|
@@ -111,11 +120,7 @@ declare module '$app/forms' {
|
|
|
111
120
|
* - redirects in case of a redirect response
|
|
112
121
|
* - redirects to the nearest error page in case of an unexpected error
|
|
113
122
|
*/
|
|
114
|
-
submit?:
|
|
115
|
-
data: FormData;
|
|
116
|
-
form: HTMLFormElement;
|
|
117
|
-
cancel: () => void;
|
|
118
|
-
}) => void | ((result: ActionResult<Success, Invalid>) => void)
|
|
123
|
+
submit?: SubmitFunction<Success, Invalid>
|
|
119
124
|
): { destroy: () => void };
|
|
120
125
|
|
|
121
126
|
/**
|