pull/11049/head
Rich Harris 1 year ago committed by GitHub
parent 1afec80261
commit bb1d229e26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -179,7 +179,7 @@ export function element(payload, tag, attributes_fn, children_fn) {
export let on_destroy = []; export let on_destroy = [];
/** /**
* @param {(...args: any[]) => void} component * @param {typeof import('svelte').SvelteComponent} component
* @param {{ props: Record<string, any>; context?: Map<any, any> }} options * @param {{ props: Record<string, any>; context?: Map<any, any> }} options
* @returns {RenderOutput} * @returns {RenderOutput}
*/ */
@ -195,6 +195,7 @@ export function render(component, options) {
/** @type {import('#server').Component} */ (current_component).c = options.context; /** @type {import('#server').Component} */ (current_component).c = options.context;
} }
// @ts-expect-error
component(payload, options.props, {}, {}); component(payload, options.props, {}, {});
if (options.context) { if (options.context) {

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

@ -49,7 +49,7 @@ This is handy when you want to pass some state to an external library or API tha
Instantiates a component and mounts it to the given target: Instantiates a component and mounts it to the given target:
```js ```js
// @errors: 2724 2305 // @errors: 2322
import { mount } from 'svelte'; import { mount } from 'svelte';
import App from './App.svelte'; import App from './App.svelte';
@ -64,7 +64,7 @@ const app = mount(App, {
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: 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:
```js ```js
// @errors: 2724 2305 // @errors: 2322
import { hydrate } from 'svelte'; import { hydrate } from 'svelte';
import App from './App.svelte'; import App from './App.svelte';

Loading…
Cancel
Save