Skip to content

Commit bb1d229

Browse files
authored
fix docs (#11048)
1 parent 1afec80 commit bb1d229

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/svelte/src/internal/server/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export function element(payload, tag, attributes_fn, children_fn) {
179179
export let on_destroy = [];
180180

181181
/**
182-
* @param {(...args: any[]) => void} component
182+
* @param {typeof import('svelte').SvelteComponent} component
183183
* @param {{ props: Record<string, any>; context?: Map<any, any> }} options
184184
* @returns {RenderOutput}
185185
*/
@@ -195,6 +195,7 @@ export function render(component, options) {
195195
/** @type {import('#server').Component} */ (current_component).c = options.context;
196196
}
197197

198+
// @ts-expect-error
198199
component(payload, options.props, {}, {});
199200

200201
if (options.context) {

packages/svelte/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ declare module 'svelte/reactivity' {
18451845
}
18461846

18471847
declare module 'svelte/server' {
1848-
export function render(component: (...args: any[]) => void, options: {
1848+
export function render(component: typeof import('svelte').SvelteComponent, options: {
18491849
props: Record<string, any>;
18501850
context?: Map<any, any>;
18511851
}): RenderOutput;

sites/svelte-5-preview/src/routes/docs/content/01-api/05-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This is handy when you want to pass some state to an external library or API tha
4949
Instantiates a component and mounts it to the given target:
5050

5151
```js
52-
// @errors: 2724 2305
52+
// @errors: 2322
5353
import { mount } from 'svelte';
5454
import App from './App.svelte';
5555

@@ -64,7 +64,7 @@ const app = mount(App, {
6464
Like `mount`, but will pick up any HTML rendered by Svelte's SSR output (from the `render` function) inside the target and make it interactive:
6565

6666
```js
67-
// @errors: 2724 2305
67+
// @errors: 2322
6868
import { hydrate } from 'svelte';
6969
import App from './App.svelte';
7070

0 commit comments

Comments
 (0)