fix(vue): remove writeGlobalTypes
**Problem**
twoslash-vue fails with newer versions of `@vue/language-core (3.1.1+)` due to importing writeGlobalTypes, which is no longer exported:
```
SyntaxError: The requested module '@vue/language-core' does not provide an export named 'writeGlobalTypes'
This breaks projects using twoslash-vue with newer @vue/language-core versions (e.g., Slidev).
```
This breaks projects using `twoslash-vue` with newer `@vue/language-core` versions (e.g., Slidev).
**Solution**
- Removed the `writeGlobalTypes` import from `@vue/language-core`
- Removed the `writeGlobalTypes(vueOptions, ts.sys.writeFile)` call
In `@vue/language-core 3.1.1+`, `writeGlobalTypes` was reimplemented without side effects and is handled internally by the Vue language plugin, so the explicit call is no longer needed.
**Changes**
- Removed unused `writeGlobalTypes` import
- Removed `writeGlobalTypes()` call in `getLanguage()`
- Kept `CompilerOptionsResolver` for Vue compiler options resolution
**Testing**
- Build passes
- No linting errors
- Type checks pass
- Existing functionality preserved
合并状态:未合并 关闭于 2025-12-21 3 条评论