Skip to content

Commit ece6b2e

Browse files
fix: JSDoc link (#15640)
just padding my PR stats for my next perf review
1 parent 1323bb3 commit ece6b2e

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

.changeset/bitter-moles-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
chore: update JSDoc

documentation/docs/20-core-concepts/60-remote-functions.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -946,13 +946,12 @@ It's not enough to just request the updates from the client -- you need to accep
946946
```js
947947
import * as v from 'valibot';
948948
import { error, redirect } from '@sveltejs/kit';
949-
import { query, form } from '$app/server';
950949
const slug = '';
951950
const post = { id: '' };
952951
/** @type {any} */
953952
const externalApi = '';
954953
// ---cut---
955-
import { requested } from '$app/server';
954+
import { query, form, requested } from '$app/server';
956955

957956
export const getPosts = query(v.object({ filter: v.string() }), async ({ filter }) => { /* ... */ });
958957

@@ -977,9 +976,9 @@ Additionally, `requested` allows a simple shorthand when all you want to do is r
977976
978977
```ts
979978
import type { RemoteQueryFunction } from '@sveltejs/kit';
979+
import { requested } from '$app/server';
980980
declare const getPosts: RemoteQueryFunction<any, any>;
981981
// ---cut---
982-
import { requested } from '$app/server';
983982
// this is the same as looping over the result and calling `void getPosts(arg).refresh()`.
984983
await requested(getPosts, 1).refreshAll();
985984
```

packages/kit/src/exports/public.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,7 @@ export type RemoteQuery<T> = RemoteResource<T> & {
21722172
*/
21732173
refresh(): Promise<void>;
21742174
/**
2175-
* Temporarily override the value of a query. This is used with the `updates` method of a [command](https://svelte.dev/docs/kit/remote-functions#command-Updating-queries) or [enhanced form submission](https://svelte.dev/docs/kit/remote-functions#form-enhance) to provide optimistic updates.
2175+
* Temporarily override a query's value during a [single-flight mutation](https://svelte.dev/docs/kit/remote-functions#Single-flight-mutations) to provide optimistic updates.
21762176
*
21772177
* ```svelte
21782178
* <script>

packages/kit/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ declare module '@sveltejs/kit' {
21462146
*/
21472147
refresh(): Promise<void>;
21482148
/**
2149-
* Temporarily override the value of a query. This is used with the `updates` method of a [command](https://svelte.dev/docs/kit/remote-functions#command-Updating-queries) or [enhanced form submission](https://svelte.dev/docs/kit/remote-functions#form-enhance) to provide optimistic updates.
2149+
* Temporarily override a query's value during a [single-flight mutation](https://svelte.dev/docs/kit/remote-functions#Single-flight-mutations) to provide optimistic updates.
21502150
*
21512151
* ```svelte
21522152
* <script>

0 commit comments

Comments
 (0)