Closed herrla closed 2 years ago
Thanks for posting this. If you use the latest npm version there should be an amended shim of Two.js's types so that you're free to use it all in Typescript without any documentation.
Overall the Typescript types are broken in many ways and I'm in the process of updating this to be based on the actual code and not on the jsdocs (this will make it more accurate).
Keeping track of this issue over here: https://github.com/jonobr1/two.js/issues/531
Describe the bug It's not possible to create a Rectangle instance with
new Two.Rectangle(...);
due to a typo in theindex.d.ts
file. The class name stated there in line 461 isRectangl
, it should beRectangle
.To Reproduce Steps to reproduce the behavior:
let rect = new Two.Rectangle(0,0,1,1);
otherwise if you use Two.Rectangl the JS runtime in the browser will throw an exception as it does not know the Two.Rectangl class.
Expected behavior Two.Rectangle should be a known class to the TS compiler.
Environment: Packaged software: yarn encore
Desktop: Browser Chrome v93