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

Fix: Toast position incorrect type #1404

Merged

Conversation

CheesyPhoenix
Copy link
Contributor

Before submitting the PR:

  • Does your PR reference an issue? If not, please chat to the team on Discord or GitHub before submission.
  • Did you update and run tests before submission using npm run test?
  • Does your branch follow our naming convention? If not, please amend the branch name using branch -m new-branch-name
  • Did you update documentation related to your new feature or changes?: Was not required

What does your PR address?

Fixes #1403. The type of position in the Toast.svelte component was only defined through a JSDoc comment leading to TypeScript inferring the type as string. Moved this to a TypeScript type instead, so that the type is now inferred correctly leading to intellisense/autocomplete working. See issue for more details.

@vercel
Copy link

vercel bot commented Apr 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2023 5:17pm

@Sarenor
Copy link
Contributor

Sarenor commented Apr 30, 2023

Thanks for the contribution!

@endigo9740
Copy link
Contributor

@CheesyPhoenix you'll have to provide the type definition both to the property AND the JSDoc, as both have a purpose here. The type on the property ensures Typescript can providing IntelliSense, while the JSDoc comment automatically documents the property.

https://www.skeleton.dev/docs/contributing/documentation

If you can make this change and include both we'll merge this. Thanks!

@CheesyPhoenix
Copy link
Contributor Author

@CheesyPhoenix you'll have to provide the type definition both to the property AND the JSDoc, as both have a purpose here. The type on the property ensures Typescript can providing IntelliSense, while the JSDoc comment automatically documents the property.

https://www.skeleton.dev/docs/contributing/documentation

If you can make this change and include both we'll merge this. Thanks!

Ah, ok. Didn't know about this. Fixed it now.

@endigo9740
Copy link
Contributor

Perfect, thanks @CheesyPhoenix

@endigo9740 endigo9740 merged commit 80389de into skeletonlabs:dev Apr 30, 2023
2 checks passed
@CheesyPhoenix CheesyPhoenix deleted the bugfix/toast-position-incorrect-type branch April 30, 2023 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toast position incorrect type
3 participants