Skip to content

fix: make docs deployable #11048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/svelte/src/internal/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export function element(payload, tag, attributes_fn, children_fn) {
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
* @returns {RenderOutput}
*/
Expand All @@ -195,6 +195,7 @@ export function render(component, options) {
/** @type {import('#server').Component} */ (current_component).c = options.context;
}

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

if (options.context) {
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@ declare module 'svelte/reactivity' {
}

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>;
context?: Map<any, any>;
}): RenderOutput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```js
// @errors: 2724 2305
// @errors: 2322
import { mount } from 'svelte';
import App from './App.svelte';

Expand All @@ -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:

```js
// @errors: 2724 2305
// @errors: 2322
import { hydrate } from 'svelte';
import App from './App.svelte';

Expand Down