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

Typescript Compatability #7

Open
GFLEMING133 opened this issue Aug 6, 2019 · 2 comments
Open

Typescript Compatability #7

GFLEMING133 opened this issue Aug 6, 2019 · 2 comments

Comments

@GFLEMING133
Copy link

GFLEMING133 commented Aug 6, 2019

Hi there,

This is more of a question than a bona-fide issue, but I am wondering if there's a type definition file for this project. I would like to use this library in my vueJS + Typescript project, but when I attempt to do so (e.g., npm install diagram-vue --save and import the Diagram component into one of my class components), I receive an error when I run npm run serve:

13:25 Could not find a declaration file for module 'diagram-vue'. 'C:/<more_path_stuff>/client/node_modules/diagram-vue/dist/diagram.umd.js' implicitly has an 'any' type.
  Try `npm install @types/diagram-vue` if it exists or add a new declaration (.d.ts) file containing `declare module 'diagram-vue';

I tried installing the types for the package, but got a 404. I'm not sure I'm technically skilled enough to write a type file (fairly new to vueJS and TS) hence the ask.

Thanks for your work--hopefully when I get this working it'll be really cool! Let me know if you want me to provide any code snippets from my project to better understand my use case if that would be helpful.

@gwenaelp
Copy link
Owner

gwenaelp commented Aug 7, 2019

Hi,

Thanks for your message, glad to see that this project reaches users !

At the moment there is nothing done. I am not that much into Typescript... I usually prefer writing everything directly in Javascript. That may change, but at the moment I am not skilled to acheive that task, sorry.

If you are motivated to try to implement it, or if anybody reading this issue is, please drop a message below :)

@GFLEMING133
Copy link
Author

That's okay--thanks for the response and invite to collaborate. I wish I were skilled enough to write the type def file but based on my time and knowledge constraints for the project I'm going to have to pass on the actual implementation for now. :(

For anyone looking in the future though, who needs this same functionality (only TS-compatible), I'd check out https://github.com/Patcher56/vue-flowy/. It isn't as cool as this library but it works like a charm with TS and has a nice clean look. Hope it helps someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants