-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
use jsxImportSource types if available #490
Comments
It respects TypeScript’s |
This comment has been minimized.
This comment has been minimized.
Interesting, yeah it doesn't seem to get recognized for me, at least in a Next.js repo with MDX and |
That project excludes MDX files from the TypeScript program by specifying an The best thing to do here is to remove the The alternative solution is to add |
This comment has been minimized.
This comment has been minimized.
Hi! Thanks for reaching out! Because we treat issues as our backlog, we close issues that are questions since they don’t represent a task to be completed. See our support docs for how and where to ask questions. Thanks, |
I see, apologies for filing an issue, didn't realize it was using a different configuration 😅. Thank you for the help! |
Initial checklist
Affected package
vscode-mdx
Steps to reproduce
jsxImportSource
, like restyle.jsxImportSource
is configured, add an MDX file that has an element with thecss
prop e.g.<div css={{ color: 'tomato' }} />
css
prop.Actual behavior
When using the
css
prop from restyle in this case, it will error incorrectly. The functionality works as expected, but there is a type error because the extension doesn't recognize thecss
element prop is ok:Expected behavior
Similar to how ts/tsx files will pick up the types if
jsxImportSource
is configured, it would be great if the VS Code extension could load the related types as well.Runtime
No response
Package manager
No response
Operating system
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: