Skip to content

Commit bf661eb

Browse files
committed
chore: update to TS v5
1 parent 3d18695 commit bf661eb

File tree

9 files changed

+90
-86
lines changed

9 files changed

+90
-86
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"devDependencies": {
2424
"@types/node": "latest",
25-
"typescript": "latest",
25+
"typescript": "next",
2626
"vite": "latest",
2727
"vitest": "latest"
2828
},

packages/language-server/src/utils/nodeFileSystemHost.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { URI } from 'vscode-uri';
33
import { FileSystem, FileSystemHost } from '../types';
44
import { IterableWeakSet } from './iterableWeakSet';
55
import { createUriMap } from './uriMap';
6+
import type * as ts from 'typescript/lib/tsserverlibrary';
67

78
let currentCwd = '';
89

packages/language-service/src/baseLanguageService.ts

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import * as signatureHelp from './languageFeatures/signatureHelp';
2727
import * as diagnostics from './languageFeatures/validation';
2828
import * as workspaceSymbol from './languageFeatures/workspaceSymbols';
2929
import { LanguageServicePlugin, LanguageServicePluginContext, LanguageServiceRuntimeContext } from './types';
30+
import type * as ts from 'typescript/lib/tsserverlibrary';
3031

3132
// fix build
3233
import type * as _ from 'vscode-languageserver-protocol';

plugins/typescript/src/protocol.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import * as Proto from 'typescript/lib/protocol';
2-
export = Proto;
1+
import * as Proto from 'typescript/lib/tsserverlibrary';
2+
export = Proto.server.protocol;
33

44
declare enum ServerType {
55
Syntax = 'syntax',
66
Semantic = 'semantic',
77
}
8-
declare module 'typescript/lib/protocol' {
8+
declare module 'typescript/lib/tsserverlibrary' {
99

1010
interface Response {
1111
readonly _serverType?: ServerType;
1212
}
1313

1414
interface JSDocLinkDisplayPart {
15-
target: Proto.FileSpan;
15+
target: Proto.server.protocol.FileSpan;
1616
}
1717
}
1818

plugins/typescript/src/utils/typeConverters.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
*/
99

1010
import * as vscode from 'vscode-languageserver-protocol';
11-
import type * as Proto from '../protocol';
1211
import * as PConst from '../protocol.const';
12+
import type * as ts from 'typescript/lib/tsserverlibrary';
1313

1414
export namespace SymbolKind {
15-
export function fromProtocolScriptElementKind(kind: Proto.ScriptElementKind) {
15+
export function fromProtocolScriptElementKind(kind: ts.ScriptElementKind) {
1616
switch (kind) {
1717
case PConst.Kind.module: return vscode.SymbolKind.Module;
1818
case PConst.Kind.class: return vscode.SymbolKind.Class;

0 commit comments

Comments
 (0)