vocs
vocs copied to clipboard
Build not failing with TypeScript error on Twoslash code block
From https://vocs.dev/docs/guides/twoslash#errors:
Shiki Twoslash then shows a pretty error, and will set the process exit code to 1 failing any builds.
Suppose I have this index.mdx file:
```ts twoslash
const a = "123"
a = 132
```
When on vocs dev, I can see it raises an error:
## Errors were thrown in the sample, but not included in an error tag
These errors were not marked as being expected: 2588.
Expected: // @errors: 2588
Compiler Errors:
index.ts
[2588] 16 - Cannot assign to 'a' because it is a constant.
When I run vocs build, it does not exit with code 1.
If this is not the intended behavior, it would be nice to have a tag that I could add to trigger a build failure, in case there is some change in the software API that was not mirrored in the documentation.
Builds now fail if Twoslash errors are thrown.