Unable to import toc
and metadata
from .mdx
when unifiedjs.vscode-mdx
in on at VS Code
#4193
Labels
bug
Something isn't working
Describe the bug A clear and concise description of what the bug is.
shows errors:
However, when I add the following
mdx.d.ts
:It starts working file for
tsc
.In the VS Code though, the
unifiedjs.vscode-mdx
provides a language server, which does some magic code injections into the evaluation context at which it itself works (see here) - and long shorty short it breaks the types.This is some hellish interaction, but it should be correctable by passing the right settings to the language server - in particular, the plugins we use to generate those
toc
andmetadata
parameters.To Reproduce Steps to reproduce the behavior:
unifiedjs.vscode-mdx
extension from the VS Code marketplace.content.mdx
file.page.tsx
file with (app router) and try importingmetadata
andtoc
from thatcontent.mdx
like the above.tsc
.mdx.d.ts
from above, see the error gone from thetsc
but no the editor.Expected behavior A clear and concise description of what you expected to
happen.
Well, believe it or not, I expected it to just work.
Screenshots If applicable, add screenshots to help explain your problem.
See above.
Desktop (please complete the following information):
potato
Smartphone (please complete the following information):
tomato
Additional context Add any other context about the problem here.
I'm so mad. Sorry if this came out rude.
The text was updated successfully, but these errors were encountered: