From fbd3b81c26ecc82a18ffd959b41e29739fd48357 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 10 Sep 2024 10:48:24 +0200 Subject: [PATCH] fix: add constraint to inference Else the type is not properly resolved sometimes Fixes a type issue with Threlte --- packages/svelte2tsx/svelte-shims-v4.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte2tsx/svelte-shims-v4.d.ts b/packages/svelte2tsx/svelte-shims-v4.d.ts index f830ea6b0..f01cf6d18 100644 --- a/packages/svelte2tsx/svelte-shims-v4.d.ts +++ b/packages/svelte2tsx/svelte-shims-v4.d.ts @@ -224,7 +224,7 @@ declare function __sveltets_2_ensureComponent< // @ts-ignore svelte.Component doesn't exist in Svelte 4 T extends ConstructorOfATypedSvelteComponent | (typeof import('svelte') extends { mount: any } ? import('svelte').Component : never) | null | undefined // @ts-ignore svelte.Component doesn't exist in Svelte 4 ->(type: T): NonNullable ? typeof import('svelte').SvelteComponent : T : T>; +>(type: T): NonNullable> ? typeof import('svelte').SvelteComponent : T : T>; declare function __sveltets_2_ensureArray | Iterable>(array: T): T extends ArrayLike ? U[] : T extends Iterable ? Iterable : any[]; type __sveltets_2_PropsWithChildren = Props &