-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
internal interface IConstructor
#1144
Comments
Can we make those interfaces public again until a better solution is found? |
Could |
@dan3988 what's your use case, I'd favor something simpler like the model I'm proposing in this PR. Building against |
@lahma I have some custom classes I've implemented similarly to the ECMA classes inside Jint/Native, where I have a separate C# class for the constructor, prototype and instance. |
Sorry to sound like a broken record, but can you give a more specific example. Doing the constructor-prototype-instance route seems quite involved compared to what it would be if we could make the interop do the leg work. |
I've extracted some of the code from the project into a repo with some examples of javascript classes: There are 30-40 classes implemented this way in our project. It was written this way as we wanted the following
|
@dan3988 excellent! thanks for taking the time to describe your use case, I'll try to delve into this and see if there is easier way or should we just open APIs again. |
maybe a constructor base class is enough |
bump, I'm facing the same problem now 😅 A constructor base class could also set the |
Discussed in #1141
Originally posted by viceice April 22, 2022
Was this intentional to no longer make that interface public? I use that for a custom type, which implements this interface.
jint/Jint/Native/IConstructor.cs
Line 5 in fe4ee89
I'm basicall doing something like this:
jint/Jint.Tests/Runtime/Domain/UuidConstructor.cs
Line 11 in fe4ee89
changed in
v3.0.0-beta-2038
viaThe text was updated successfully, but these errors were encountered: