Closed jglee96 closed 2 years ago
I don't understand, can you elaborate and provide some test?
UPDATE: Yes, some path commands types aren't exported, they're there to build the others.
What is your suggestion please?
Sorry to not enough explanation and my language skill. I want to change my code like this:
const type = pathCommand[0];
switch (type) {
case 'M' {
////
}
case 'L' {
////
}
}
->
const type = pathCommand[0];
switch (type) {
case MCommand {
////
}
case LCommand {
////
}
}
I see, so you need to have all path commands (as well as all segment types) exported to global namespace?
Yes, That's What I mean.
Will have it done with the next update.
How is the TypeScript definition with SVGPathCommander? How would you rate it so far? (I'm new to TS myself)
Recently I've been lookig for SVG Path processing tool. I think SVGPathCommander is the best with TS. Others are hard to use with TS because of insufficient type declaration.
Oh thanks!
If you don't mind can you share what you're doing? I might have a better solution or I may get more insight on what TypeScript definitions might need.
I try to search each verb of SVG Path and edit points. Then we can be provided the services that make new shape from original shape. I'm sorry, but I can't tell you any more details because it's a team job.
Hello, I'm using this library with typescript. I trying to edit segments with path commands. I can edit width path command string (ex. 'M', 'L', 'C' ..). I think that using path commands is looks better. However path commands are not exoprted to index.d.ts, only absoluteCommand and relativeCommand are exported. Is it intended exporting?