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

Missing types for graph level data #52755

Closed
5 tasks done
danielnichols opened this issue May 5, 2021 · 0 comments · Fixed by #56140
Closed
5 tasks done

Missing types for graph level data #52755

danielnichols opened this issue May 5, 2021 · 0 comments · Fixed by #56140

Comments

@danielnichols
Copy link

If you know how to fix the issue, make a pull request instead.

The following code snippets cause issues:

const graph = cytoscape({ data: { foo: 'bar' } });
Argument of type '{ data: { foo: string; }; }' is not assignable to parameter of type 'CytoscapeOptions'.
  Object literal may only specify known properties, and 'data' does not exist in type 'CytoscapeOptions'.ts(2345)
const data = graph.data();
const dataField = graph.data('foo');
graph.data('bar', 'foo');
graph.data({ foo: 'baz', hello: 'world' });
Property 'data' does not exist on type 'Core'.ts(2339)
graph.removeData('foo');
Property 'removeData' does not exist on type 'Core'.ts(2339)

Docs for the graph data field are here: https://js.cytoscape.org/#cy.data

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

Successfully merging a pull request may close this issue.

1 participant