# vue: Install a global version of TypeScript if not present in the project \(\#14747\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/be1ff8aee954cd3a58d51978ec990428df79230c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: be1ff8aee954cd3a58d51978ec990428df79230c

Requested commit: be1ff8aee954cd3a58d51978ec990428df79230c

Commit: be1ff8aee954cd3a58d51978ec990428df79230c

Tree: 86df828a51f439f1b841a3ce6d689eab2fee33f8

Author: Marshall Bowers

Committer: GitHub

## Message

```
vue: Install a global version of TypeScript if not present in the project (#14747)

This PR updates the Vue extension with support for installing and using
its own copy of TypeScript if it can't find one in the project.

The way we resolve `typescript` is as follows:

- We check the project's `package.json` for `typescript` in either the
`devDependencies` or `dependencies`
- If found, we set the `typescript.tsdk` to
`node_modules/typescript/lib` to use the project's copy of TypeScript
- If not found, we install the latest version of `typescript` (if not
already downloaded) to the extension's `package.json` and use that
version for `typescript.tsdk`

This should resolve instances where Vue projects that do not have an
explicit `typescript` dependency—such as those using Vue with plain
JavaScript—fail to load the language server due to TypeScript not being
found.

Release Notes:

- N/A
```

## Parents

- [3a83fecea9f383460464107b1d44069e02091bc6](https://git.cafe/gitcafe/zed/commit/3a83fecea9f383460464107b1d44069e02091bc6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/be1ff8aee954cd3a58d51978ec990428df79230c?format=markdown)
