Open florianeichincode opened 1 year ago
Came back to this topic. Solution;
import 'cytoscape-grid-guide';
this.cy?.gridGuide({ // Configure the grid guide plugin gridSpacing: 50, // Example spacing snapToGrid: true // Example option // Add more options as needed });
Add a cytoscape.d.ts file with declare module 'cytoscape' { interface Core { gridGuide(options?: any): void; } }
I have trouble to import the grud guide module to my angular project.
I get the following error:
Could not find a declaration file for module 'cytoscape-grid-guide'. '/home/user/xxx/node_modules/cytoscape-grid-guide/src/index.js' implicitly has an 'any' type. Try
npm i --save-dev @types/cytoscape-grid-guideif it exists or add a new declaration (.d.ts) file containing
declare module 'cytoscape-grid-guide';``Is there a typescript type definition that i can use? Maybe you can create one for npm?