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

Omissions in the type.d.ts file in the Two.Path module? #634

Closed
dickinson0718 opened this issue May 27, 2022 · 4 comments
Closed

Omissions in the type.d.ts file in the Two.Path module? #634

dickinson0718 opened this issue May 27, 2022 · 4 comments
Labels

Comments

@dickinson0718
Copy link
Contributor

I'm updating from 0.7.13 to 0.8.7 for my typescript application and I think that there are possibly some omissions in the type.d.ts file in the Two.Path module.

  1. The first issue is that I'm getting the error "Property 'closed' does not exist on type 'Path'" seen here

Screen Shot 2022-05-27 at 2 04 06 PM

this worked in 0.7.13 and I think that the current error stems from the fact that the file type.d.ts in the Path module

Screen Shot 2022-05-27 at 2 05 00 PM

doesn't include the closed property (like it does for beginning, ending, fill, stroke, etc).

  1. I'm trying to use a RadialGradient for a fill of a Path (just like I did in 0.7.13) and I get the error of

Screen Shot 2022-05-27 at 2 50 53 PM

Again I think that the type for Path.fill should be more than just string in the type.d.ts file in the Path module

Screen Shot 2022-05-27 at 2 51 55 PM

Shouldn't the type for Path.fill be string or gradient or texture?

  1. I'm trying to scale a layer in a non-uniform way so I would like to assign newLayer as a vector (like I did in 0.7.13) and the following tooltip seems to indicate is possible.

Screen Shot 2022-05-27 at 3 59 56 PM

So shouldn't the type of Shape.scale be number or vector?

@jonobr1
Copy link
Owner

jonobr1 commented May 31, 2022

This is super helpful. Thank you! I'll try to address these all very soon.

@jonobr1
Copy link
Owner

jonobr1 commented May 31, 2022

Those changes are reflected in this PR: #637

@jonobr1
Copy link
Owner

jonobr1 commented May 31, 2022

This is added to the latest npm package: https://www.npmjs.com/package/two.js

@dickinson0718
Copy link
Contributor Author

@jonobr1 Thank you for your attention to this!

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

No branches or pull requests

2 participants