Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type definition for SvelteToastOptions #106

Open
domuk-k opened this issue Sep 13, 2024 · 1 comment · Fixed by #107
Open

Add type definition for SvelteToastOptions #106

domuk-k opened this issue Sep 13, 2024 · 1 comment · Fixed by #107
Labels
enhancement New feature or request

Comments

@domuk-k
Copy link

domuk-k commented Sep 13, 2024

The src/lib/index.js file currently lacks a type definition for SvelteToastOptions.

import { toast } from '@zerodevx/svelte-toast';
// ❌ import type { SvelteToastOptions } from '@zerodevx/svelte-toast/stores'; 
/** "/stores"  is not exposed  */ 

// 😔 export type SvelteToastOptions = Parameters<typeof toast.push>[1];

function customToast(message: string, options: SvelteToastOptions) {
   toast(message, options);
}

This change will offer a better development experience for developers using the SvelteToast library.

domuk-k added a commit to domuk-k/svelte-toast that referenced this issue Sep 13, 2024
@zerodevx
Copy link
Owner

Hey, thanks so much for the PR - moving the conversation to #107

@zerodevx zerodevx added the enhancement New feature or request label Sep 15, 2024
@zerodevx zerodevx linked a pull request Sep 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants