-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register custom Class #113
Comments
Would be very helpfull to me also for registering classes like Request and Response for fetch api |
Yeah it would be nice. I think we need lots of APIs to make it easy to use Starlight. Like add builder like API for adding new properties to objects or easier API to declare accessors and methods on the objects. |
I am going to work on this. 🤣 |
We now support register custom class, and also snapshot for custom class
|
but it's still a little complex now. I am going to make it simpler. |
Please also consider how to remove a custom class. E.g. when registering a custom class for a native module, e.g. import('my_native_mysql_con') i want to register custom Connection/Resultset classes but i also want to remove them when the module is no longer needed. Keep up the great work so far! |
That'll be wonderful. I'll try ~ |
It's very simple to register custom class now
|
We could expose an API, for example,
register_class
to register a custom class in the global object.The text was updated successfully, but these errors were encountered: