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

feat: providing types for all exports #617

Merged
merged 5 commits into from
Mar 13, 2023
Merged

feat: providing types for all exports #617

merged 5 commits into from
Mar 13, 2023

Conversation

ineshbose
Copy link
Collaborator

@ineshbose ineshbose commented Feb 15, 2023

Follows #583.

Features:

  • Provides types for all exports
  • Export types are literals
  • Done in a single declaration file that comes up to 130 lines at default

Needs discussion:

  • PR awaits fix: nested props resolution #616
  • Adding to nuxt.d.ts references - Done, but please let me know if there's another way the types can be referred
  • #tailwind-config alias resolution - Done, not going for alias but only allowing #tailwind-config since that's encouraged by docs and .nuxt/tailwind.config... could get tricky depending on file/directory location; also updated docs accordingly
  • Depending on templates' dst - Not needed if step above is omitted
    • currently using hardcoded .nuxt/tailwind.config as safety, but obviously only to demo the work
    • implementation is as fallback to the hardcoded demo eg || t.dst

Providing a playground to test changes: https://stackblitz.com/github/ineshbose/nuxt-tailwindcss-module/tree/feat/types (although I don't think Stackblitz gives quick TypeScript intellisense)

@atinux atinux changed the title [RFC] feat: providing types for all exports feat: providing types for all exports Mar 10, 2023
@atinux
Copy link
Collaborator

atinux commented Mar 10, 2023

Would love to get a review from @danielroe as being the TS master 😄

@nuxt-studio
Copy link

nuxt-studio bot commented Mar 12, 2023

Live Preview ready!

Name Edit Preview Latest Commit
TailwindCSS Edit on Studio ↗︎ View Live Preview 6db4111

Copy link
Contributor

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

Co-authored-by: Daniel Roe <daniel@roe.dev>
@atinux atinux merged commit d4c2a94 into nuxt-modules:main Mar 13, 2023
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.

3 participants