-
-
Notifications
You must be signed in to change notification settings - Fork 212
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using {...$$restProps}
, type infos are getting lost when running svelte-kit package
To Reproduce
repro to clone: https://github.com/mrtnbroder/svelte-lost-types
Expected behavior
Using $$restProps
shouldn't mess up the types produced
When using $$restProps
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
[x: string]: any;
class?: string | null;
disabled?: boolean | null;
};
events: {
[evt: string]: CustomEvent<any>;
};
slots: {
default: {};
};
};
export declare type ButtonProps = typeof __propDef.props;
export declare type ButtonEvents = typeof __propDef.events;
export declare type ButtonSlots = typeof __propDef.slots;
export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
}
export {};
vs
not using $$restProps
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
/** CSS class for the element. */ class?: string | null;
/** Whether the button is disabled. */ disabled?: boolean | null;
};
events: {
[evt: string]: CustomEvent<any>;
};
slots: {
default: {};
};
};
export declare type ButtonProps = typeof __propDef.props;
export declare type ButtonEvents = typeof __propDef.events;
export declare type ButtonSlots = typeof __propDef.slots;
export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
}
export {};
inokawa and SystemParadox
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working