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
cytoscape-html-label.d.ts is not a module after importing it in a component (angular 7) #31
Comments
Wrong d.ts file. Please, rebuild and republish. @kaluginserg |
Any updates on this issue? I would really like to use this extension for an angular project. |
Hello all |
Hello, I have the permissions to publish new versions, but not much time to do so. |
Does simply adding the export to the interface fix the problem? |
Yes that's it but I could be good to have a new use case. |
Hello all, |
Released version |
I have the same issue with angular 9. Is there any fix available? I want to use this in an angular project. |
Does version |
Yes, 1.2.0 and angular 9. |
I confirm: still not working on 1.2.1. Using |
I found a way to solve it, this is my "cytoscape-node-html-label.js" from v1.2.1: declare type IHAlign = "left" | "center" | "right";
declare type IVAlign = "top" | "center" | "bottom";
interface NodeRequireFunction {
(id: string): any;
}
interface NodeModule {
exports: any;
require: NodeRequireFunction;
id: string;
filename: string;
loaded: boolean;
/** @deprecated since 12.19.0 Please use `require.main` and `module.children` instead. */
parent: NodeModule | null | undefined;
children: NodeModule[];
/**
* @since 11.14.0
*
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
*/
path: string;
paths: string[];
}
declare var module: NodeModule;
declare var define: any;
declare var cytoscape: typeof cytoscape;
interface CytoscapeNodeHtmlParams {
query?: string;
halign?: IHAlign;
valign?: IVAlign;
halignBox?: IHAlign;
valignBox?: IVAlign;
cssClass?: string;
tpl?: (d: any) => string;
}
interface CytoscapeContainerParams {
enablePointerEvents?: boolean;
}
declare module 'cytoscape-node-html-label' I've added Then I've added Then you can import them as usual: import * as cytoscape from 'cytoscape';
import * as nodeHtmlLabel from 'cytoscape-node-html-label'; |
When importing cytoscape-html-label as a module, so
import htmlLabel from cytoscape-html-label
, there is an error in the angular saying that cytoscape-html-label.d.ts is not a moduleThe text was updated successfully, but these errors were encountered: