[JSX] Type Promise<string> is not assignable to type AttributeValue | undefined
Hey there 👋
I was trying to follow along the awesome intro to the BETH stack https://www.youtube.com/watch?v=cpzowDDJj24
So far I've setup
- empty bun project via
bun init
- elysia
and @elysiajs/html
- typed-html
and adjusted the tsconfig.json
Here is the seemingly simple code
Here is my issue
The code runs and renders the HTML fine BUT I am getting the following issue in my IDEs (tested with WebStorm & Cursor)
TS2322: Type Element is not assignable to type AttributeValue | undefined
Type Promise<string> is not assignable to type AttributeValue | undefined
elements.d.ts(6, 5): The expected type comes from property children which is declared here on type IntrinsicAttributes & Children
Any ideas on how to solve the type mismatch?![No description](https://cdn.answeroverflow.com/1164110835644379166/image.png)
4 Replies
GitHub
GitHub - ethanniser/beth-big
Contribute to ethanniser/beth-big development by creating an account on GitHub.
hi @Ethan can you just tell in previous version why was that type error occuring?
It’s been so long I really couldn’t tell you sorry
understandable. thanks.