fix type that lead using the the JSDescriptor directly instead of the factory method

This commit is contained in:
Fabio Pliger
2024-02-01 12:12:08 -06:00
parent 3b8745e875
commit 3f19695704

View File

@@ -79,7 +79,7 @@ def _add_js_properties(cls, *attrs):
"""Add JSProperties to a class as `js_property` class attributes."""
# First we set all the properties as JSProperties
for attr in attrs:
setattr(cls, attr, JSProperty(attr))
setattr(cls, attr, js_property(attr))
# Now we patch the __init__ method to specify the properties
cls.__init__.__doc__ = f"""Class constructor.