Types are not visually recognized in VSCode after build
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 274
- PR merge metrics
- No merged PRs in 30d
Description
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:
```typescript
export interface ButtonProps
extends React.ButtonHTMLAttributes,
VariantProps {
asChild?: boolean
}
```
The generated types:
```typescript
interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps {
asChild?: boolean;
}
export { type ButtonProps };
```
Causes this behavior:

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

I don't know if this is really a problem, but I'd like to know why it's happening :)
Contributor guide
Research direction
No repository files or tests are named. Reproduce the shown TypeScript interface build with tsup, then compare the generated declaration with VSCode's type-icon behavior. Determine whether the export form comes from tsup or TypeScript; done means identifying the responsible tool and confirming a fix or explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- build-system, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100