tsparticles / angular

Angular tsParticles official component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ngx-confetti error type.

sebalr opened this issue · comments

Details

ngx-confetti is not working in Angular 15 project using npm.

Error: node_modules/ng-particles/lib/ng-particles.component.d.ts:18:89 - error TS2344: Type '{ options: { alias: "options"; required: false; }; url: { alias: "url"; required: false; }; id: { alias: "id"; required: false; }; particlesInit: { alias: "particlesInit"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"options"' is incompatible with index signature. Type '{ alias: "options"; required: false; }' is not assignable to type 'string'. 18 static ɵcmp: i0.ɵɵComponentDeclaration<NgParticlesComponent, "ng-particles", never, { "options": { "alias": "options"; "required": false; }; "url": { "alias": "url"; "required": false; }; "id": { "alias": "id"; "required": false; }; "particlesInit": { "alias": "particlesInit"; "required": false; }; }, { "particlesLoaded": "particlesLoaded"; }, never, never, false, never>;

Please describe a bit what is the problem with some code samples, and please don't trigger sweep on your own.

Sorry about sweep, I didn't know that it was optional.
Theres is an error in node_modules folder in ngx-particles component input declaration. No code sample is needed, just plain Angular 15 projects fails to build with this library installed.
I did some research and it looks like that the library is incompatible with Angular 15, I tried with 17 and works.
A note on readme with required version would be nice.
Thanks

This is something with angular build, something built with newer angular version is not compatible backwards.

Got it, thanks. It would be nice to have a min compatible version note on readme