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
Copy file name to clipboardExpand all lines: packages/kit/src/runtime/app/state/client.js
-36Lines changed: 0 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -5,32 +5,6 @@ import {
5
5
}from'../../client/state.svelte.js';
6
6
import{stores}from'../../client/client.js';
7
7
8
-
/**
9
-
* A reactive object with information about the current page, serving several use cases:
10
-
* - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load))
11
-
* - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions))
12
-
* - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing))
13
-
* - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error
14
-
*
15
-
* ```svelte
16
-
* <!--- file: +layout.svelte --->
17
-
* <script>
18
-
* import { page } from '$app/state';
19
-
* </script>
20
-
*
21
-
* <p>Currently at {page.url.pathname}</p>
22
-
*
23
-
* {#if page.error}
24
-
* <span class="red">Problem detected</span>
25
-
* {:else}
26
-
* <span class="small">All systems operational</span>
27
-
* {/if}
28
-
* ```
29
-
*
30
-
* On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time.
31
-
*
32
-
* @type {import('@sveltejs/kit').Page}
33
-
*/
34
8
exportconstpage={
35
9
getdata(){
36
10
return_page.data;
@@ -58,12 +32,6 @@ export const page = {
58
32
}
59
33
};
60
34
61
-
/**
62
-
* An object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.
63
-
* Values are `null` when no navigation is occurring, or during server rendering.
* A reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.
97
-
* @type {{ get current(): boolean; check(): Promise<boolean>; }}
* A reactive object with information about the current page, serving several use cases:
15
+
* - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load))
16
+
* - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions))
17
+
* - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing))
18
+
* - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error
19
+
*
20
+
* ```svelte
21
+
* <!--- file: +layout.svelte --->
22
+
* <script>
23
+
* import { page } from '$app/state';
24
+
* </script>
25
+
*
26
+
* <p>Currently at {page.url.pathname}</p>
27
+
*
28
+
* {#if page.error}
29
+
* <span class="red">Problem detected</span>
30
+
* {:else}
31
+
* <span class="small">All systems operational</span>
32
+
* {/if}
33
+
* ```
34
+
*
35
+
* On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time.
* A reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.
51
+
* @type {{ get current(): boolean; check(): Promise<boolean>; }}
0 commit comments