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

Types are not visually recognized in VSCode after build #1278

Open
piusidev opened this issue Jan 22, 2025 · 0 comments
Open

Types are not visually recognized in VSCode after build #1278

piusidev opened this issue Jan 22, 2025 · 0 comments

Comments

@piusidev
Copy link

After building my code with tsup, the types are not visually identified as such in VSCode. The type icon is not displayed correctly, causing confusion when working in the editor, although functionality is not affected.

The source code:

export interface ButtonProps
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
    VariantProps<typeof buttonVariants> {
  asChild?: boolean
}

The generated types:

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
    asChild?: boolean;
}

export { type ButtonProps };

Causes this behavior:

Image

And if i manually change the builded code to export the interface directly:

Image

I don't know if this is really a problem, but I'd like to know why it's happening :)

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

No branches or pull requests

1 participant