You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{SvelteComponentTyped}from"svelte";declareconst__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: {};};};exportdeclaretypeButtonProps=typeof__propDef.props;exportdeclaretypeButtonEvents=typeof__propDef.events;exportdeclaretypeButtonSlots=typeof__propDef.slots;exportdefaultclassButtonextendsSvelteComponentTyped<ButtonProps,ButtonEvents,ButtonSlots>{}export{};
The text was updated successfully, but these errors were encountered:
To me this looks as expected. You are using $$restProps which means you support passing other properties than the ones explicitly defined on the component. So the type definitions need to reflect that by also having an index signature on the props definition. Is it this what you think is wrong or is it something else?
Describe the bug
When using
{...$$restProps}
, type infos are getting lost when runningsvelte-kit package
To Reproduce
repro to clone: https://github.com/mrtnbroder/svelte-lost-types
Expected behavior
Using
$$restProps
shouldn't mess up the types producedWhen using
$$restProps
vs
not using
$$restProps
The text was updated successfully, but these errors were encountered: