N00ts / vue3-treeview

a simple treeview in vue js 3
MIT License
71 stars 61 forks source link

Fix index.d.ts declaration #17

Open sfe-efficy opened 2 years ago

sfe-efficy commented 2 years ago

Using vue-tsc to generate types and export correctly the type definitinion from a template vue. Define the type of objects required for the tree component. Using vue-tsc is complaining about use "class" and ":class" properties with the error "Left side of comma operator is unused and has no side effects." Update packages, it was not possible to installed with npm install before updating eslint packages.

sfe-efficy commented 2 years ago

This is related with the issue https://github.com/N00ts/vue3-treeview/issues/10

N00ts commented 2 years ago

I will check in coming days :)

N00ts commented 2 years ago

Hello, sorry I just cheked your PR, can you remove the package-lock.json ? I only use yarn for this project. I saw that your removed the "class" static attributes "node-wrapper" and "checkbox-wrapper", You put "node-wrapper"" in "nodeClass" but I feel like "checkbox-wrapper" just disapeared., what about it ?

Regards

sfe-efficy commented 2 years ago

Hi! Removed the packag-lock.json

About the "checkbox-wrapper" doesn't disappeared.

The computed variable checkedClass contains the value:

image

I needed to move into the computed variable because typescript is complaining when I try to compile with the attribute "class" and ":class" (dynamic one).

image

image


But, I guess with my MR the div node original with the class name "checkbox-wrapper" is going to have the class name "checkbox-wrapper" when original was no present.

I tried to keep the double attribute "class" with and without colon, but I cannot fix the original error

N00ts commented 2 years ago

I can't run "yarn run all" with your branch. I'm up to date. Apparently "yarn run lint" and "yarn types" does not work anymore.

image

image

On my ubuntu 22.04 lts with node 12.22.9, after a clean repo and a yarn install, it does not seem to work.

Regards

sfe-efficy commented 2 years ago

Hi! I guess is because "vue-tsc", at least in node 12 is not correctly of fully supported. In my case I'm using node 16.14.2

And also, I saw that a lot of components are removing the support for node 12, for example eslint-plugin-vue or eslint-config-typescript.

hypnotic-frog commented 1 year ago

Hey, any advances on merging this? Thanks!

N00ts commented 1 year ago

I will have a look as soon as I have time :)

scscgit commented 1 year ago

I was just about to make a new issue about missing types... Please don't forget to make a progress with this :)

Lisiadito commented 1 year ago

@sfe-efficy what is the status on this?

N00ts commented 8 months ago

I think this PR is too old, the project has evolved since