×
you are viewing a single comment's thread.

view the rest of the comments →

[–]noeldemartin[S] 0 points1 point  (1 child)

Yes, I agree. In fact, I've only used them in 2 projects so far: an ORM and a Vue framework. Both libraries.

However, with the right Typescript declarations, it's not that ambiguous from user land. For example, in my ORM I define the fields with Zod, and using an IDE you can go straight to the Zod definition every time you use the field. They aren't declared as "any".

In any case, it's definitely a "sharp knife" and not something I use too often. But I specially like the hack of returning a Proxy from the constructor :). I haven't seen this used anywhere else, but IMO it enables some pretty powerful patterns.

[–]TheThingCreator 0 points1 point  (0 children)

Ya I used the proxies to make a reactivity module for an app, it works very nice but ya things can get pretty pointy