Skip to content
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
2 changes: 2 additions & 0 deletions packages/svelte/src/compiler/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export interface CompileOptions extends ModuleCompileOptions {
* Set to `undefined` (the default) to infer runes mode from the component code.
* Is always `true` for JS/TS modules compiled with Svelte.
* Will be `true` by default in Svelte 6.
* Note that setting this to `true` in your `svelte.config.js` will force runes mode for your entire project, including components in `node_modules`,
* which is likely not what you want. If you're using Vite, consider using [dynamicCompileOptions](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#dynamiccompileoptions) instead.
* @default undefined
*/
runes?: boolean | undefined;
Expand Down
1 change: 0 additions & 1 deletion packages/svelte/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// This should contain all the public interfaces (not all of them are actually importable, check current Svelte for which ones are).

import type { Getters } from '#shared';
import './ambient.js';

/**
Expand Down
10 changes: 7 additions & 3 deletions packages/svelte/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,6 @@ declare module 'svelte' {
: [type: Type, parameter: EventMap[Type], options?: DispatchOptions]
): boolean;
}
type Getters<T> = {
[K in keyof T]: () => T[K];
};
/**
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
Expand Down Expand Up @@ -470,6 +467,9 @@ declare module 'svelte' {
* https://svelte.dev/docs/svelte#getallcontexts
* */
export function getAllContexts<T extends Map<any, any> = Map<any, any>>(): T;
type Getters<T> = {
[K in keyof T]: () => T[K];
};

export {};
}
Expand Down Expand Up @@ -810,6 +810,8 @@ declare module 'svelte/compiler' {
* Set to `undefined` (the default) to infer runes mode from the component code.
* Is always `true` for JS/TS modules compiled with Svelte.
* Will be `true` by default in Svelte 6.
* Note that setting this to `true` in your `svelte.config.js` will force runes mode for your entire project, including components in `node_modules`,
* which is likely not what you want. If you're using Vite, consider using [dynamicCompileOptions](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#dynamiccompileoptions) instead.
* @default undefined
*/
runes?: boolean | undefined;
Expand Down Expand Up @@ -2628,6 +2630,8 @@ declare module 'svelte/types/compiler/interfaces' {
* Set to `undefined` (the default) to infer runes mode from the component code.
* Is always `true` for JS/TS modules compiled with Svelte.
* Will be `true` by default in Svelte 6.
* Note that setting this to `true` in your `svelte.config.js` will force runes mode for your entire project, including components in `node_modules`,
* which is likely not what you want. If you're using Vite, consider using [dynamicCompileOptions](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#dynamiccompileoptions) instead.
* @default undefined
*/
runes?: boolean | undefined;
Expand Down