Skip to content

Commit

Permalink
Remove Vue TypeScript troubleshooting section (#2276)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Jan 10, 2023
1 parent e885e00 commit 72b72d4
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 40 deletions.
8 changes: 0 additions & 8 deletions src/pages/en/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,3 @@ For the default setting of `jsxImportSource: react`, you would use:
// For Solid
/** @jsxImportSource solid-js */
```

### Vue components are mistakenly typed by the `@types/react` package when installed

The types definitions from the `@types/react` package are declared globally and therefore will be mistakenly used to typecheck `.vue` files when using [Volar](https://github.com/johnsoncodehk/volar).

**Status**: Expected behavior.

**Solution**: There's currently no reliable way to fix this, however a few solutions and more discussion can be found in [this GitHub discussion](https://github.com/johnsoncodehk/volar/discussions/592).
8 changes: 0 additions & 8 deletions src/pages/es/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,3 @@ Para la configuración por defecto `jsxImportSource: react`, deberías hacer lo
// Para Solid
/** @jsxImportSource solid-js */
```

### Componentes de Vue son erróneamente tipados al instalar el paquete `@types/react`

Las definiciones de tipos del paquete `@types/react` son declaradas de forma global y por lo tanto son usadas para chequear tipos en los archivos `.vue` al usar [Volar](https://github.com/johnsoncodehk/volar).

**Estado**: Comportamiento esperado.

**Solución**: Aún no hay una forma confiable de solucionar este error, sin embargo, algunas soluciones y discusiones pueden encontrarse en [esta discusión en GitHub](https://github.com/johnsoncodehk/volar/discussions/592).
8 changes: 0 additions & 8 deletions src/pages/ja/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,3 @@ type MyAttributes = astroHTML.JSX.ImgHTMLAttributes;
// Solid向け
/** @jsxImportSource solid-js */
```

### `@types/react`パッケージがインストールされていると、Vueコンポーネントが誤って型付けされる

`@types/react`パッケージの型定義はグローバルに宣言されているため、[Volar](https://github.com/johnsoncodehk/volar)を用いた際に`.vue`ファイルの型チェックに誤って使用されることがあります。

**ステータス**:想定された挙動。

**解決策**:今のところ、この問題を確実に解決する方法はありませんが、いくつかの解決策や議論が[このGitHub discussion](https://github.com/johnsoncodehk/volar/discussions/592)に掲載されています。
8 changes: 0 additions & 8 deletions src/pages/pt-br/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,3 @@ Para a opção padrão de `jsxImportSource: react`, você usaria:
// Para Solid
/** @jsxImportSource solid-js */
```

### Componentes Vue são erroneamente tipados pelo pacote `@types/react` quando instalado

A definições de tipo do pacote `@types/react` são declarados globalmente e portanto podem ser erroneamente usados para checar os tipos de arquivos `.vue` quando estiver utilizando [Volar](https://github.com/johnsoncodehk/volar).

**Status**: Comportamento esperado.

**Solução**: Ainda não há nenhuma boa forma de resolver isso, porém, algumas soluções e mais discussão sobre podem ser encontrados nessa [discussion do GitHub](https://github.com/johnsoncodehk/volar/discussions/592).
8 changes: 0 additions & 8 deletions src/pages/zh-cn/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,3 @@ type MyAttributes = astroHTML.JSX.ImgHTMLAttributes;
// For Solid
/** @jsxImportSource solid-js */
```

### 在安装了 `@types/react` 包的情况下,Vue 组件的类型检查被错误的处理

`@types/react` 包中的类型定义是全局声明的,因此在使用 [Volar](https://github.com/johnsoncodehk/volar) 时会被错误地用于对 `.vue` 文件进行的类型检查。

**状态**:预期行为。

**解决方案**:目前没有可靠的方法来解决此问题,但是可以在[此 GitHub discussion](https://github.com/johnsoncodehk/volar/discussions/592) 中找到一些解决方案和更多的讨论。

0 comments on commit 72b72d4

Please sign in to comment.