Skip to content

Conflicting type definitions when using @vscode/python-extension package #21664

Closed Answered by alcarney
alcarney asked this question in Q&A
Discussion options

You must be logged in to vote

Looking at this again, it appears that the conflicts are beacuse I have @types/vscode 1.78.0 installed, but the @vscode/python-extension package bundles @types/vscode 1.80.0.

Adding the following to my tsconfig.json appears to resolve the issue

 {
     "compilerOptions": {
         "module": "commonjs",
         "target": "ES2020",
+       "baseUrl": ".",
+       "paths": {
+            "vscode": [
+                "node_modules/@types/vscode"
+            ]
+        },
         "lib": [
             "ES2020"
         ],
         "sourceMap": true,
         "rootDir": "src",
         "outDir": "dist",
         "strict": true,
         "noImplicitReturns": true,
         "noFallthroughCase…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@brettcannon
Comment options

@karrtikr
Comment options

@karrtikr
Comment options

@alcarney
Comment options

@lukiszlak
Comment options

Answer selected by brettcannon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area-api API related issues
4 participants