plotly / react-cytoscapejs

React component for Cytoscape.js network visualisations
MIT License
483 stars 68 forks source link

Add TypeScript typings #39

Open ryanberckmans opened 5 years ago

ryanberckmans commented 5 years ago

Could you please add TypeScript typings to this repo or to a new @types/react-cytoscapejs package?

Looks like someone already wrote them https://github.com/manuc66/react-cytoscapejs-typescript-sample/blob/master/typings/react-cytoscapejs.d.ts

PeterJFerrarotto commented 5 years ago

That typing set is not good enough - it doesn't contain the typing details for CytoscapeComponent.normalizeElements, so the user can't call the function when using TypeScript

manuc66 commented 5 years ago

CytoscapeComponent.normalizeElements and other properties are now present in the definition, see: https://github.com/manuc66/react-cytoscapejs-typescript-sample/blob/master/typings/react-cytoscapejs.d.ts

maxkfranz commented 5 years ago

@manuc66, would you please add your definition to DefinitelyTyped?

There are instructions here: https://definitelytyped.org/guides/contributing.html

manuc66 commented 4 years ago

Here is the PR : DefinitelyTyped/DefinitelyTyped#45577

manuc66 commented 4 years ago

The PR has been merged

manuc66 commented 3 years ago

close