But when I use document in my code, it still throw an error
--------
Twoslash error in code:
--------
const app = document.getElementById('#app')
--------
TwoslashError:
## Errors were thrown in the sample, but not included in an error tag
These errors were not marked as being expected: 2584.
Expected: // @errors: 2584
Compiler Errors:
index.ts
[2584] 12 - Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.
Describe the bug
In
nuxt.config.ts
I have addedcompilerOptions
But when I use
document
in my code, it still throw an errorThe markdown file is in
content/blog/test.md
Reproduction
https://github.com/gjssss/hellogjs.top/tree/cddae922b9cd3a68154e76d86c339914a901d83c
System Info
Used Package Manager
pnpm
Validations