fix: add types for svelte/reactivity - closes #10816

pull/10817/head
Rich Harris 2 years ago
parent 474fc7ebe0
commit 703c9b203a

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: add types for svelte/reactivity

@ -29,6 +29,7 @@ await createBundle({
[`${pkg.name}/easing`]: `${dir}/src/easing/index.js`,
[`${pkg.name}/legacy`]: `${dir}/src/legacy/legacy-client.js`,
[`${pkg.name}/motion`]: `${dir}/src/motion/public.d.ts`,
[`${pkg.name}/reactivity`]: `${dir}/src/reactivity/index.js`,
[`${pkg.name}/server`]: `${dir}/src/server/index.js`,
[`${pkg.name}/store`]: `${dir}/src/store/public.d.ts`,
[`${pkg.name}/transition`]: `${dir}/src/transition/public.d.ts`,

@ -1806,6 +1806,49 @@ declare module 'svelte/motion' {
export function tweened<T>(value?: T | undefined, defaults?: TweenedOptions<T> | undefined): Tweened<T>;
}
declare module 'svelte/reactivity' {
export class Date extends Date {
static "__#5@#inited": boolean;
constructor(...values: any[]);
#private;
}
export class Set<T> extends Set<any> {
constructor(value?: Iterable<T> | null | undefined);
has(value: T): boolean;
add(value: T): this;
delete(value: T): boolean;
keys(): IterableIterator<T>;
values(): IterableIterator<T>;
entries(): IterableIterator<[T, T]>;
[Symbol.iterator](): IterableIterator<T>;
#private;
}
export class Map<K, V> extends Map<any, any> {
constructor(value?: Iterable<readonly [K, V]> | null | undefined);
has(key: K): boolean;
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, this_arg?: any): void;
get(key: K): V | undefined;
set(key: K, value: V): this;
delete(key: K): boolean;
keys(): IterableIterator<K>;
values(): IterableIterator<V>;
entries(): IterableIterator<[K, V]>;
[Symbol.iterator](): IterableIterator<[K, V]>;
#private;
}
}
declare module 'svelte/server' {
export function render(component: (...args: any[]) => void, options: {
props: Record<string, any>;

Loading…
Cancel
Save