ui
ui copied to clipboard
use-toast build error on deployment
Works fine on dev environment but failed to build in vercel
This is related to an eslint error. Check the use-toast.ts file and change line:
interface Toast extends Omit<ToasterToast, "id"> {}
To
type Toast = Omit<ToasterToast, "id">
@shadcn Do you think there is a reason to use interface? I was thinking maybe it would be an interesting idea to change all components to use type notation instead of interface notation when inheriting from other types without additional properties.
In case you are interested I can provide a PR for it later. Maybe would avoid ESlint issues like this for new users
@shadcn
Also, there is a comon ESLint rule called consistent-type-imports
I can also create dedicated PR in case it interests you to satisfy this eslint rule.
@dBianchii I was afraid that changing it to type
would break things so I did this for now. real janky but it works.
interface Toast extends Omit<ToasterToast, "id"> {
never?: never
}
@shadcn Also, there is a comon ESLint rule called consistent-type-imports
![]()
I can also create dedicated PR in case it interests you to satisfy this eslint rule.
I also made a PR for this https://github.com/shadcn/ui/pull/287
@tanjunior I don't think changing it to type will break anything
@tanjunior I don't think changing it to type will break anything
ok I will test it and update my PR if there is no issues.