Closed Schmell closed 4 months ago
You cannot serialize functions, only JSON-friendly structures are allowed. Therefore you need to make the action/onClick property serializable and add the function on the client instead. When you have fixed that, adding the type to src/app.d.ts should make it type-safe: https://github.com/ciscoheat/sveltekit-flash-message?tab=readme-ov-file#1-add-the-flash-message-to-appdts-typescript-only
Oh ya I totally forgot that was part of the set up. Thanks
I love this library especially with forms. Thanks I have recently started using svelte-sonner and it would be really cool if we could send down the properties of description and action. and add the enums for
type
ie: warning, info, promise, etc.. I mean it already works, but I get type errors, so i guess you just need to add more typesEDIT: Actually i think this would make it work better with svelte french toast as well