Code Monkey home page Code Monkey logo

Comments (9)

johnsoncodehk avatar johnsoncodehk commented on June 19, 2024 1

Hi @humpangle, please install @vue/runtime-dom for vue 2 project. See https://github.com/johnsoncodehk/volar#using.

from coc-volar.

humpangle avatar humpangle commented on June 19, 2024 1

I have raised the issue with @vue/composition-api. @yaegassy , would you like me to close this issue?

from coc-volar.

yaegassy avatar yaegassy commented on June 19, 2024

Does this problem also occur with VSCode's volar extension?

If possible, could you please provide the smallest code sample you can reproduce?


If downgrading the version of coc-volar temporarily solves your problem, please give it a try.

:CocUninstall @yaegassy/coc-volar
:CocInstall @yaegassy/[email protected]

from coc-volar.

humpangle avatar humpangle commented on June 19, 2024

Thanks for the response. Downgrading to 0.5.9 did make the errors go away, but then there is no longer intellisense. You can take a look here https://github.com/humpangle/non-typescript-vue-coc-volar/blob/36d29889a43d7406a803929854f75a794fda93b3/src/components/HelloWorld.vue#L2

You will get errors for both the sayHi callback and the msg prop.

Below are my coc-volar and vue related settings:

  "volar.codeLens.references": false,
  "volar.codeLens.pugTools": false,
  "volar.codeLens.scriptSetupTools": false,
  "volar.formatting.enable": false,
  "prettier.disableLanguages": [],
  "emmet.includeLanguages": {
    "vue-html": "html",
  }

from coc-volar.

yaegassy avatar yaegassy commented on June 19, 2024

By installing @vue/runtime-dom, the error was resolved in my environment. (coc-volar v0.5.10)

@humpangle Did you solve the problem?

Downgrading to 0.5.9 did make the errors go away, but then there is no longer intellisense.

As a side note, coc-volar v0.5.9 (volar v0.27.6) or earlier, required tsconfig.json or jsconfig.json in the project.

from coc-volar.

humpangle avatar humpangle commented on June 19, 2024

Thanks @johnsoncodehk and @yaegassy . I have installed @vue/runtime-dom as suggested and that made the errors go away.

But I have found the problem is with @vue/composition-api. If you look at the repo https://github.com/humpangle/non-typescript-vue-coc-volar in commit 624c5f5 where I introduced @vue/composition-api here https://github.com/humpangle/non-typescript-vue-coc-volar/blob/624c5f56abecb53164ba90745a902e6cd6fb4b5c/src/components/Some.vue#L8, then I started getting the same callback error as in my actual project.

Here is the location of the error https://github.com/humpangle/non-typescript-vue-coc-volar/blob/624c5f56abecb53164ba90745a902e6cd6fb4b5c/src/components/HelloWorld.vue#L2.

The error message:

[ts 2322] [E] Type 'any' is not assignable to type 'never'.

from coc-volar.

johnsoncodehk avatar johnsoncodehk commented on June 19, 2024

It's seem a bug, please forward @vue/composition-api types issue to @vue/composition-api repo.

from coc-volar.

humpangle avatar humpangle commented on June 19, 2024

Thanks @johnsoncodehk. I will do just that right away.

But should I be getting type issues in a non TS project? Apologies if I should have found the answer some where.

from coc-volar.

johnsoncodehk avatar johnsoncodehk commented on June 19, 2024

Thanks @johnsoncodehk. I will do just that right away.

But should I be getting type issues in a non TS project? Apologies if I should have found the answer some where.

Maybe follow vuejs/language-tools#411.

from coc-volar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.