-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using workspace typescript version #682
Comments
I'm seeing the same issue. Is there something we are missing with config of language server in vscode? Just updated to 1.20 and seeing the same issue. |
I've created PR (#686) but as long as it isn't merged you will be seeing errors.
|
In my opinion, .vue files should be handled by the same tsserver as .ts files. In vscode we have the ability to switch between a globally installed version, the version bundled with vscode and the version used by the project. I believe that Vetur should be able to provide the same functionality. |
This would hopefully also give us those quick fixes via the light bulb as well. |
When we can expect release of this fix? vue-cli 3 ts template is not supported by vetur right now. |
Hi @AndrewBogushevich , you can download the new release here. |
Will this go into the marketplace or is that no longer a thing and we should grab them from tags? |
I just installed the latest version of visual studio code and Vetur today. When will this 0.11.8 version be published so it can be directly updated in the Visual Studio Code extensions? I agree Vetur should use the same version of Typescript as Visual Studio Code. I agree with @kogli that this should be handled to prevent chasing down errors that are not actually errors at all - just version mismatches. Also I recommend that the Vetur plugin put the Typescript version in the footer like .ts files do so it is clear which version of Typescript is being used. |
I have the same issue. I tried uninstalling, deleting and reinstalling the extension, it still installs the 0.11.7 version, so the problem persists. |
@habbes |
@goszczynskip Thank you so much! |
Is currently any way to specify the typescript binary location of Vetur? I encounter same issue when I upgrade the version of TypeScript in my project to This situation makes my project build failed but Vetur shows no error. // lib.dom.d.ts in TS 3.3.3
interface DragEvent extends MouseEvent {
/**
* Returns the DataTransfer object for the event.
*/
readonly dataTransfer: DataTransfer | null;
}
// lib.dom.d.ts in TS 2.8.4 (Vetur 0.15.0)
interface DragEvent extends MouseEvent {
readonly dataTransfer: DataTransfer;
initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
msConvertURL(file: File, targetType: string, targetURL?: string): void;
}
I encountered lots of errors and still failed in the end when trying this way (with
After |
Hi, I have a small question (to @octref ?). from release notes I see:
Is there a plan to actually allow this to be a workspace settings. I just want to tell my team to install Vetur (and couple of other VS plugins) and clone the project. All setting like autoformatting on save with prettier is a workspace setting. Why this one should be different?
You can argue that if user decided to work on specific workspace then he agrees to run 3rd party code that this workspace requires. |
Imagine I mod the TypeScript server that sends all sourcefiles to a remote location, put that in a project, and enable this setting as workspace setting. The goal is not for convenience. It is that user has to opt-in. You acknowledge the risk of trusting all the dependencies installed in a specific project. The out of box experience has no risk. I plan to change formatters as well, so you have to explicitly set a user setting for it to load local dependencies. |
There's a small difference. "Formatting" is an explicit action and you would agree that "since I'm running this I'm passing my source to the extension", whereas the TS server can run in the background as soon as you open the workspace with no user interaction. Bottom line: If user don't initiate any command or run any script, just browsing around, it needs to be safe. |
What about using the It's quite confusing when |
@glen-84 Please open a new issue |
Info
Problem
There is no error at compile time. But vscode prompt error.
I had updated ts 2.7.1 global, set "typescript.tsdk": "C:/Users/Administrator/AppData/Roaming/npm/node_modules/typescript/lib" and switch ts version to 2.7.1 in .ts file.But it don't work in .vue file. I guess it still use default version ts of vscode in .vue file.
So I hope I can switch ts version in .vue file like in .ts file.
The text was updated successfully, but these errors were encountered: