williamngan / pts

A library for visualization and creative-coding
https://ptsjs.org
Apache License 2.0
5.18k stars 182 forks source link

`Group.toBound`'s return type wrongly marked as `Group` #214

Closed suguruwataru closed 4 months ago

suguruwataru commented 5 months ago

As a convenience method for creating a Bound from a group, this wrong type annotation makes it less convenient... Type check wrongly complains about passing a Group where a Bound is expected and we don't get completion on Bound's members.

https://github.com/williamngan/pts/blob/47de4b76ce6a24892c2c7e2b155c09a18e1d5b7e/src/Pt.ts#L946-L947