Skip to content
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

Understanding twoslash VFS, doing something wrong? missed something? #59

Open
Adammatthiesen opened this issue Nov 10, 2024 · 0 comments

Comments

@Adammatthiesen
Copy link

Adammatthiesen commented Nov 10, 2024

As I have been progressing through stabilizing my new expressive-code-twoslash Expressive code plugin, one of the issues I've been facing is the inability to use the showEmit functions. It seems that the VFS is not being appended correctly, I've tried reading through the source of both shiki-twoslash as well as twoslash and it seems like this should be handled automatically by twoslash, but the only thing I seem to get is the error "unable to find file from virtual file system containing ." for any codeblock I try to enable showEmit on. Would appreciate any input that could help resolve this issue.

With EC:

Input:

```ts twoslash
// @showEmit
const level: string = 'Danger'
```

Error:

## Cannot find the output file in the Twoslash VFS

Looking for index.js in the Twoslash vfs after compiling

Looked for" /home/native/Documents/Repos/EC-Plugins/docs/twoslash/index.js in the vfs - which contains .

Project Github for reference: https://github.com/MatthiesenXYZ/EC-Plugins/tree/main/packages/twoslash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant