Mitosis JSX types are not properly mapped
- Dominant language
- TypeScript
- Stars
- 14.4k
- Forks
- 671
- PR merge metrics
- No merged PRs in 30d
Description
Originally from https://github.com/BuilderIO/mitosis/issues/372#issuecomment-1150135164
For this input:
```tsx
import { HTMLAttributes } from "react";
export const headingSizes = [1, 2, 3, 4, 5, 6];
export interface HeadingProps extends HTMLAttributes {
size: typeof headingSizes[number];
}
export default function Heading(props: HeadingProps) {
return
}
```
the output does not preserve the `import { HTMLAttributes } from "react";` import
Contributor guide
Research direction
No source file, test, or entry point is named in the issue. Reproduce the problem with the supplied TSX input, then trace the JSX type-mapping path; done means the generated output preserves the React HTMLAttributes import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100