CSG2 should return CSG2 type instead of any

Version: 7.34.4

Background

Currently CSG2.FromMesh and other CSG2 methods return any type, makes it harder to inference type of returned value, and make it harder for devs to get type hints compared to the old CSG.

The CSG2.FromMesh:

The CSG.FromMesh:

Proposal

Make user-facing CSG2 methods return CSG2 type instead of any.

Risks

Since CSG2 is already released with any type, narrowing the type to CSG2 could be breaking for typescript users.

CC @Deltakosh , I don’t see why it would be a problem doing that, but he would probably know better, as he built it :slight_smile:

No problem at all and probably an oversight on my side
Please do a PR @kzhsw

1 Like
4 Likes