adrai / flowchart.js

Draws simple SVG flow chart diagrams from textual representation of the diagram
http://flowchart.js.org/
MIT License
8.54k stars 1.21k forks source link

how to use this in typescript? #247

Closed fogjoe closed 8 months ago

fogjoe commented 1 year ago

Nowdays, i plan to use in vue3, typescript, vite, but when i install the flowchart, it tips me to install the type, so i install the type package, but the error occurs: image and my dependencies are as follows: image how can solve this problem? Or need i to use other chart libraries?

adrai commented 1 year ago

flowchart.js has no types and since TypeScript is a superset of JavaScript, there should be no problem

wirekang commented 8 months ago

@liwei478 You installed wrong package: install flowchart.js instead of flowchart.

wirekang commented 8 months ago

@adrai Looks like you forgot that somebody added types for this awesome project(4 years ago 👍🏼). https://github.com/adrai/flowchart.js/blob/master/types/index.d.ts
https://github.com/adrai/flowchart.js/pull/212

adrai commented 8 months ago

You're right... I forgot... too many open source projects 🤣