Skip to content
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

Take Over Mode not working properly - TS Errors without Take Over #1169

Closed
ragokan opened this issue Apr 11, 2022 · 12 comments
Closed

Take Over Mode not working properly - TS Errors without Take Over #1169

ragokan opened this issue Apr 11, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@ragokan
Copy link

ragokan commented Apr 11, 2022

1- Most of quick fix options does not work on TS files.
2- Suggestions does not show right props.

This video is recorded on initial project that is created with npm init vue@latest
https://user-images.githubusercontent.com/63511519/162743102-70c8e8f6-4ab5-45ba-a241-c28842efc391.mov


When I disable Take Over mode, even in the initial beginning project, I get these errors;
image
Basically Vue TS does not recognize the .Vue files.

@yaegassy
Copy link
Collaborator

yaegassy commented Apr 11, 2022

@ragokan For projects created with create-vue, Try adding declare module "*.vue" ... to env.d.ts.

If "Take Over Mode" is enabled, conversely, delete this "shim" addition.

Example:

/// <reference types="vite/client" />

declare module "*.vue" {
  import type { DefineComponent } from "vue";
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
  const component: DefineComponent<{}, {}, any>;
  export default component;
}

@ragokan
Copy link
Author

ragokan commented Apr 11, 2022

@ragokan For projects created with create-vue, Try adding declare module "*.vue" ... to env.d.ts.

If "Take Over Mode" is enabled, conversely, delete this "shim" addition.

Example:

/// <reference types="vite/client" />

declare module "*.vue" {
  import type { DefineComponent } from "vue";
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
  const component: DefineComponent<{}, {}, any>;
  export default component;
}

Oh, thanks. This solves without take over mode usage. Still I don't know how to fix them with take over mode. Please see to the video:
https://user-images.githubusercontent.com/63511519/162743102-70c8e8f6-4ab5-45ba-a241-c28842efc391.mov

@yaegassy
Copy link
Collaborator

Do you have node_modules in your project? try, npm i or pnpm i or yarn

@ragokan
Copy link
Author

ragokan commented Apr 11, 2022

Do you have node_modules in your project? try, npm i or pnpm i or yarn

Yes, I do. It is not my first project, too.

@yaegassy
Copy link
Collaborator

Your .mov appears to have no node_modules and no lock file.

volar-issue-1169-1

@ragokan
Copy link
Author

ragokan commented Apr 11, 2022

Your .mov appears to have no node_modules and no lock file.

volar-issue-1169-1

They are just hidden in vscode

@yaegassy
Copy link
Collaborator

See here. Have you disabled @builtin typescript? #471 (comment)

@ragokan
Copy link
Author

ragokan commented Apr 11, 2022

See here. Have you disabled @builtin typescript? #471 (comment)

Yes, I did.

@ragokan
Copy link
Author

ragokan commented Apr 11, 2022

If you want, you can connect my computer or vscode live share.

@yaegassy
Copy link
Collaborator

I can't reproduce it in my environment. The only other thing I can think of is to restart VSCode. I can't reproduce it, so I have no further advice... :(

@extrem7
Copy link

extrem7 commented Apr 11, 2022

Take over mode also became broken in all my projects after the weekend
image

@ragokan
Copy link
Author

ragokan commented Apr 11, 2022

Take over mode also became broken in all my projects after the weekend image

Yeah, in my previous projects, I didn't have any errors, I just created this one yesterday, but errors started after the updates in extension.

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants