Build TS extension against current vscode.d.ts directly
Currently extensions like TS have a dev dependency on the `"vscode"` package. This pulls in a copy of `vscode.d.ts` that we end up using instead of our local `vscode.d.ts`. This change uses the `paths` `tsconig` option so that we use our local `vscode.d.ts` instead of the one from `node_modules`
This commit is contained in:
parent
45999fdb8f
commit
5b284c140c
3 changed files with 10 additions and 4 deletions
|
@ -28,7 +28,7 @@ class JsDocCompletionItem extends vscode.CompletionItem {
|
||||||
const suffix = line.slice(position.character).match(/^\s*\**\//);
|
const suffix = line.slice(position.character).match(/^\s*\**\//);
|
||||||
const start = position.translate(0, prefix ? -prefix[0].length : 0);
|
const start = position.translate(0, prefix ? -prefix[0].length : 0);
|
||||||
const range = new vscode.Range(start, position.translate(0, suffix ? suffix[0].length : 0));
|
const range = new vscode.Range(start, position.translate(0, suffix ? suffix[0].length : 0));
|
||||||
this.range = <any>{ inserting: range, replacing: range };
|
this.range = { inserting: range, replacing: range };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
|
||||||
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
|
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
|
||||||
|
|
|
@ -2,7 +2,14 @@
|
||||||
"extends": "../shared.tsconfig.json",
|
"extends": "../shared.tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out",
|
"outDir": "./out",
|
||||||
"experimentalDecorators": true
|
"experimentalDecorators": true,
|
||||||
|
// https://github.com/microsoft/TypeScript/issues/31869#issuecomment-515167432
|
||||||
|
"baseUrl": "src/\u0000",
|
||||||
|
"paths": {
|
||||||
|
"vscode": [
|
||||||
|
"../../../../src/vs/vscode.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*"
|
"src/**/*"
|
||||||
|
|
Loading…
Reference in a new issue