Closed lukatendai closed 2 years ago
No it does return the whole array but as far as I know this Funktion is not used anymore? Have to double check
As a test I commented the two lines in svg.js.d.ts (380 and 439) and now the application compiles and runs without errors.
hmm, same issue here, commented the lines, but its just a temporary fix
@Fuzzyma looks like you removed the function from PointArray
and PathArray
in this commit: https://github.com/svgdotjs/svg.js/commit/747f8e810eea3bb4836b50f411a7de6f5d67cbfa#
@Basementbrb in that case it should be removed form the typescript file alltogether
when the latest code is published to npm this issue should be fixed
Just to know, any ETA when the new version will be released?
any update?
new version released, see https://github.com/svgdotjs/svg.js/issues/1245#issuecomment-1022660309
I can confirm that the new release solves my issue ❤️
Error: node_modules/@svgdotjs/svg.js/svg.js.d.ts:380:9 - error TS2416: Property 'at' in type 'PointArray' is not assignable to the same property in base type 'Array'.
Type '(pos: number) => PointArray' is not assignable to type '(index: number) => ArrayXY'.
Type 'PointArray' is not assignable to type 'ArrayXY'.
380 at(pos: number): PointArray; ~~
Error: node_modules/@svgdotjs/svg.js/svg.js.d.ts:439:9 - error TS2416: Property 'at' in type 'PathArray' is not assignable to the same property in base type 'Array'.
Type '(pos: number) => PathArray' is not assignable to type '(index: number) => PathCommand'.
Type 'PathArray' is not assignable to type 'PathCommand'.
Type 'PathArray' is not assignable to type '["a" | "A", number, number, number, number, number, number, number]'.
It looks like at should return element of the array not the whole array?