-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
Create Typescript definition #119
Comments
Hello Would that make this library usable while working on Angular2? I currently have a project running on PrimeNg and would like to include Drawflow as this look like the best library to do flowgraph. If yes, what steps do I need to take in order to include and use your typescript definition in my project? Also think that it would be great if this was included inside the library by default. Thanks in advance! |
Hello @BobBDE Good Job!! I have played very little with typescript. I can't help on that. And I don't have much time. ( #9 ) You could create a fork with project typescript. Let's see if an expert, I can review-it. Hello @raph74 Even if it's not in typescript, it should work the same, since it's vanilla javascript. Jero |
@jerosoler Another option will be recode the library in typescript (which i recommend because it improves stability). This should not be too long because you can do it incrementally, and the lib is quite small. And once built the library would be plain vanilla so it would still be usable in pure js project (I think). But I would understand if you prefer to keep it in pure js. |
Hello @raph74 , Yes you can use this lib in angular project (i'm doing it).
Here are the steps :
|
Thanks to both of you for quick answers and awesome plugins! I think I got the library installed and the definition ready to use in typescript. Here is what my html looks like (easy...): And here is how I retrieve the div inside typescript: And finaly how I setup my my ngOnInit() to instantiate the Drawflow: I basically just copy/pasted the example given in doc folder. If any of you have ideas on what am I doing wrong, I would be grateful! |
Hi @raph74 Anyway, I don't think this is a place for this kind of talk. Stackoverflow would be more adapter, I could answer you there. |
Hello @jerosoler , Good news ! 🍾🍾🍾 The typescript type package is available !! So if someone wants to use drawflow in a TS project he just need to add the
Is it possible to add it to the documentation ? Just the I tested it and it works ! It really simplify the use of drawflow in TS project. |
WoW! Good Joob! @BobBDE I will add it to the documentation. |
@BobBDE Good job! I did include the definitions using the npm install and removed my manual installation. Still got the same issue but I think you're right, I did create a stackoverflow so it's easier to discuss about it. Post is here: https://stackoverflow.com/questions/66267792/drawflow-library-on-typescript |
Added to doc: da5ad14 |
Great, thanks ! |
Is this should return array of numbers not void ? @BobBDE update: I have opened PR for this issue. |
@GodSpeedXI Hi, thanks for the PR, I merged it ! :) |
Hey @jerosoler, do you already know when you will rewrite it in TypeScript or add some tests with high coverage for stability? |
Hello,
I'm currently working to add the typescript definition for the package :)
I created a PR in the DefinitelyTyped repository. To be merge, the PR need to be reviewed by another person.
Can someone do this review ? Here is the link to the PR : https://github.com/DefinitelyTyped/DefinitelyTyped/pull/51271/files
Also if someone want to be a co-owner of the PR (not sure how this really works) but it says that is a good idea because multiple person would be able to update the typing.
Thank you
The text was updated successfully, but these errors were encountered: