fix: typegen

pull/10320/head
S. Elliott Johnson 6 months ago
parent 979170ce05
commit 3f9a246144

@ -313,6 +313,8 @@ declare module 'svelte' {
type NotFunction<T> = T extends Function ? never : T;
// Utility type for ensuring backwards compatibility on a type level: If there's a default slot, add 'children' to the props if it doesn't exist there already
// if you're curious why this is here and not declared as an unexported type from `public.d.ts`, try putting it there
// and see what happens in the output `index.d.ts` -- it breaks, presumably because of a TypeScript compiler bug.
type PropsWithChildren<Props, Slots> = Props &
(Props extends { children?: any }
? {}
@ -1848,6 +1850,8 @@ declare module 'svelte/legacy' {
};
};
// Utility type for ensuring backwards compatibility on a type level: If there's a default slot, add 'children' to the props if it doesn't exist there already
// if you're curious why this is here and not declared as an unexported type from `public.d.ts`, try putting it there
// and see what happens in the output `index.d.ts` -- it breaks, presumably because of a TypeScript compiler bug.
type PropsWithChildren<Props, Slots> = Props &
(Props extends { children?: any }
? {}

Loading…
Cancel
Save