Closed queuedq closed 2 years ago
Thanks for posting @queuedq. Mind giving the latest dev
branch a try and see if that fixes the issue?
You can do that like so:
npm install --save https://github.com/jonobr1/two.js
If it's good on your end then I can publish a new version to NPM
Thank you for the quick response!
After installation, I imported two.js like this:
import Two from '@jonobr1/two.js';
But it emits the following error message.
File '(...)/node_modules/@jonobr1/two.js/types.d.ts' is not a module.
I guess it's due to a name mismatch and it should work without problems after publishing, though. (Is there a way I can test it?)
Edit: I set compilerOptions.paths
and the types are working great! But I can't run it with Parcel, so I'll wait for the release.
Ah, right because everything is expecting @jonobr1/two.js
not two.js
. I'll push the release now.
Okay that's up: https://www.npmjs.com/package/two.js
Thanks again for you posting.
It works fine now, thank you!
Glad to hear! Thanks again for reporting
Describe the bug Some classes like
Rectangle
orCircle
don't have a constructor declared intypes.d.ts
. Since they inherit fromPath
, the constructors for them default to thePath
's constructor. However, their constructors are different from thePath
's constructor.To Reproduce
Environment (please select one):
I'm using Parcel with TypeScript.
tsconfig: