You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Resolve a path to the `name` directory inside `outDir`, e.g. `/path/to/.svelte-kit/my-adapter`.
139
139
* @param name path to the file, relative to the build directory
140
140
*/
141
-
getBuildDirectory(name: string):string;
141
+
getBuildDirectory: (name: string)=>string;
142
142
/** Get the fully resolved path to the directory containing client-side assets, including the contents of your `static` directory. */
143
-
getClientDirectory():string;
143
+
getClientDirectory: ()=>string;
144
144
/** Get the fully resolved path to the directory containing server-side code. */
145
-
getServerDirectory():string;
145
+
getServerDirectory: ()=>string;
146
146
/** Get the application path including any configured `base` path, e.g. `my-base-path/_app`. */
147
-
getAppPath():string;
147
+
getAppPath: ()=>string;
148
148
149
149
/**
150
150
* Write client assets to `dest`.
151
151
* @param dest the destination folder
152
152
* @returns an array of files written to `dest`
153
153
*/
154
-
writeClient(dest: string):string[];
154
+
writeClient: (dest: string)=>string[];
155
155
/**
156
156
* Write prerendered files to `dest`.
157
157
* @param dest the destination folder
158
158
* @returns an array of files written to `dest`
159
159
*/
160
-
writePrerendered(dest: string):string[];
160
+
writePrerendered: (dest: string)=>string[];
161
161
/**
162
162
* Write server-side code to `dest`.
163
163
* @param dest the destination folder
164
164
* @returns an array of files written to `dest`
165
165
*/
166
-
writeServer(dest: string):string[];
166
+
writeServer: (dest: string)=>string[];
167
167
/**
168
168
* Copy a file or directory.
169
169
* @param from the source file or directory
@@ -172,20 +172,20 @@ export interface Builder {
172
172
* @param opts.replace a map of strings to replace
173
173
* @returns an array of files that were copied
174
174
*/
175
-
copy(
175
+
copy: (
176
176
from: string,
177
177
to: string,
178
178
opts?: {
179
179
filter?(basename: string): boolean;
180
180
replace?: Record<string,string>;
181
181
}
182
-
):string[];
182
+
)=>string[];
183
183
184
184
/**
185
185
* Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals.
186
186
* @param {string} directory The directory containing the files to be compressed
187
187
*/
188
-
compress(directory: string):Promise<void>;
188
+
compress: (directory: string)=>Promise<void>;
189
189
}
190
190
191
191
exportinterfaceConfig{
@@ -215,13 +215,13 @@ export interface Cookies {
215
215
* @param name the name of the cookie
216
216
* @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options)
* Gets all cookies that were previously set with `cookies.set`, or from the request headers.
222
222
* @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options)
* Sets a cookie. This will add a `set-cookie` header to the response, but also make the cookie available via `cookies.get` or `cookies.getAll` during the current request.
@@ -233,11 +233,11 @@ export interface Cookies {
233
233
* @param value the cookie value
234
234
* @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
* Deletes a cookie by setting its value to an empty string and setting the expiry date in the past.
@@ -246,7 +246,7 @@ export interface Cookies {
246
246
* @param name the name of the cookie
247
247
* @param opts the options, passed directly to `cookie.serialize`. The `path` must match the path of the cookie you want to delete. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
* Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response.
@@ -259,11 +259,11 @@ export interface Cookies {
259
259
* @param value the cookie value
260
260
* @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
* `await parent()` returns data from parent `+layout.js` `load` functions.
899
899
* Implicitly, a missing `+layout.js` is treated as a `({ data }) => data` function, meaning that it will return and forward data from parent `+layout.server.js` files.
900
900
*
901
901
* Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data.
902
902
*/
903
-
parent():Promise<ParentData>;
903
+
parent: ()=>Promise<ParentData>;
904
904
/**
905
905
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.
* Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data.
1326
1326
*/
1327
-
parent():Promise<ParentData>;
1327
+
parent: ()=>Promise<ParentData>;
1328
1328
/**
1329
1329
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.
0 commit comments