retejs / angular-plugin

https://retejs.org
MIT License
53 stars 34 forks source link

Example wont compile in Angular 10 #28

Closed magallardo closed 1 year ago

magallardo commented 3 years ago

I have followed the example and mimic that code in my project. However, when I try to compile, I am getting the following errors when trying to register the component with the editor.

components.map(c => { editor.register(c); engine.register(c); });

error TS2345: Argument of type 'NumComponent | AddComponent' is not assignable to parameter of type 'Component'. Type 'NumComponent' is missing the following properties from type 'Component': editor, data, builder, build, and 4 more.

40       editor.register(c);
                         ~

error TS2345: Argument of type 'NumComponent | AddComponent' is not assignable to parameter of type 'Component'. Type 'NumComponent' is missing the following properties from type 'Component': name, data, engine, worker

41       engine.register(c);

I was also looking at the documentation and the example does not seem to implement the AngularComponent as shown in the document. So, I am a little confused how the example is actually running.

Please advise.

Thanks, Marcelo

creadicted commented 3 years ago

Please format your code in an issue. Could it be that you mix import of "Component" from angular/core and "Component" from rete?

rete-js[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.