Skip to content
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

There are some errors in svg.js.d.ts #1245

Closed
lykl opened this issue Jan 7, 2022 · 10 comments
Closed

There are some errors in svg.js.d.ts #1245

lykl opened this issue Jan 7, 2022 · 10 comments

Comments

@lykl
Copy link

lykl commented Jan 7, 2022

When I was packing the production package, the editor gave me an error, so I could not pack normally.
Finally I found the error existed with the file.

class PointArray extends Array<ArrayXY> {
    constructor();
    constructor(array?: ArrayAlias<ArrayXY> | number[]);

    toLine(): LineAttr;
    at(pos: number): PointArray;
    transform(m: Matrix | MatrixLike): PointArray
    move(x: number, y: number): this;
    size(width: number, height: number): this;
    bbox(): Box;
    to(a: any): Morphable;
    toString(): string;
}

The PointArray class has an at method, while the base class Array< ArrayXY> The following also exists, which leads to errors.
The cause of the error should be a variable name conflict.
The same error occurs in the:

class PathArray extends Array<PathCommand> {
    constructor();
    constructor(d: ArrayAlias<PathCommand> | PathArrayAlias);

    move(x: number, y: number): this;
    size(width: number, height: number): this;
    equalCommands(other: PathArray): boolean
    morph(pa: PathArray): this
    at(pos: number): PathArray
    parse(array?: ArrayAlias<PathCommand> | PathArrayAlias): PathCommand[];
    bbox(): Box;
    to(a: any): Morphable
}
@Fuzzyma
Copy link
Member

Fuzzyma commented Jan 7, 2022

Can you try master?

@lykl
Copy link
Author

lykl commented Jan 12, 2022

Can you try master?

It seems that the NPM version has not been updated.
The latest version is 3.1.1

@Fuzzyma
Copy link
Member

Fuzzyma commented Jan 12, 2022

Thats why I tell you: try master

@Stefan-Behrendt
Copy link

Could you please release a new version with the bug fix via NPM anyways? It's unsatisfying not being able to use the latest version in our package.json file and using a link to the GitHub master instead...

@larshp
Copy link
Contributor

larshp commented Jan 16, 2022

also see #1212, possible fix merged in #1223, but not released

@tobium
Copy link

tobium commented Jan 18, 2022

pls release a new version with #1212

@tobium
Copy link

tobium commented Jan 25, 2022

What can we do to publish a new release?

@smarza
Copy link

smarza commented Jan 26, 2022

Please. 🙏

@larshp
Copy link
Contributor

larshp commented Jan 26, 2022

Personally, I started sponsoring the maintainer, in hope to see more activity, if you are using the library I suggest considering, so we can have sustainable open source.

Worst case I'll have to write a new library, or migrate to a different one, which is much more effort than a small sponsorship. Or waiting for releasing this change, where I also implemented the fix(assuming it works), #1223

@Fuzzyma
Copy link
Member

Fuzzyma commented Jan 26, 2022

Sorry, I am quite busy. I released a new version (3.1.2) that hold all the latest changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants