From 7fe1c4e9d289b19c996b34d3b1d02c2b6b7e8b6d Mon Sep 17 00:00:00 2001 From: Petr Plenkov Date: Thu, 13 Mar 2025 09:57:03 +0000 Subject: [PATCH] update ts version and get rid of the error --- package-lock.json | 31 +++++++++++++++++++++++++++---- package.json | 4 ++-- src/index.ts | 3 ++- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3ac1986..7377719 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,36 @@ { "name": "my-plugin", "version": "0.0.1", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "my-plugin", + "version": "0.0.1", + "license": "MIT", + "dependencies": { + "typescript": "^5.8.2" + } + }, + "node_modules/typescript": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + }, "dependencies": { "typescript": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", - "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==" + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==" } } } diff --git a/package.json b/package.json index cb439eb..a1e8fe6 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,6 @@ "license": "MIT", "main": "./out", "dependencies": { - "typescript": "^4.4.3" + "typescript": "^5.8.2" } -} +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index aad22fc..3a0d66d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ -function init(modules: { typescript: typeof import("typescript/lib/tsserverlibrary") }) { +import * as ts from "typescript/lib/tsserverlibrary"; +function init(modules: { typescript: typeof ts }) { const ts = modules.typescript; function create(info: ts.server.PluginCreateInfo) {