# languages: Pin TypeScript to 6.x for typescript-language-server \(\#60970\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a25f19cb2f55baa4cf8638981043ac64af741d62

Requested commit: a25f19cb2f55baa4cf8638981043ac64af741d62

Commit: a25f19cb2f55baa4cf8638981043ac64af741d62

Tree: 259ad8db6ed4ef1a209778c5bfc345567ff8d63e

Author: Smit Barmase

Committer: GitHub

## Message

```
languages: Pin TypeScript to 6.x for typescript-language-server (#60970)

Closes https://github.com/zed-industries/zed/issues/60618

TypeScript 7 no longer ships `tsserver.js`, which
`typescript-language-server` depends on.

This PR does two things:
1. Pins the `typescript` package Zed auto-installs for
`typescript-language-server` to `^6`. For projects without their own
TypeScript in `node_modules` (which rely on the copy Zed installs), an
existing 7.x install gets downgraded to the latest 6.x, making the
server usable again.
2. Only hands the workspace's TypeScript to the server as a tsdk when it
actually contains `tsserver.js`, falling back to Zed's installed 6.x
otherwise. So if you upgraded your project to TypeScript 7, the language
server won't break. It keeps working against the 6.x TypeScript Zed
ships.

Note that vtsls, the default TypeScript language server, is unaffected
by the TypeScript 7 release. It bundles its own compatible TypeScript.
See #60951 for details. This PR only affects users who have manually
configured `typescript-language-server` as their language server.

Release Notes:

- Fixed `typescript-language-server` breaking after the TypeScript 7
release. For projects that have upgraded to TypeScript 7, install the
`tsgo` extension to use TypeScript's native language server.
```

## Parents

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

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