-
Notifications
You must be signed in to change notification settings - Fork 557
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
✨ [Typescript] eslint rule to avoid some common gotchas #7402
Comments
@Xiot Thanks for your report!
It's because we currently do not support that kind of annotation (see #7401 (comment))
I'm not sure I understand the idea behind, do you mean having an eslint that can catch unsupported feature of the SDK such as custom inline union type? |
Well there two main things here. Well 3 if you count the string literals, but thats for another issue. The thing that caught me a little off guard was that the prototype chain isn't preserved when you re-hydrate a field.
Calling
will return
That shows that prototype of the My comment about eslint, was coming up with a way to let developers know that even though what they are doing is supported in the language, it won't actually work. |
I should have actually created a bug for the prototype not being there, rather than the eslint rule |
Created a separate issue for the prototype #7446 |
What are you trying to do?
While trying to get around #7401, I tried to keep the
@field
as a string, but then just type a custom property.However it seems that the prototype isn't actually preserved when the object is used from another module.
First prize, would be to re-attach the prototype chain, but barring that, it would be nice to have an eslint rule to catch things that work slightly differently than a typescript developer would expect.
Why is this important to you?
It would avoid some errors caused by the way that dagger modules are executed.
How are you currently working around this?
I just removed the custom getters, and I check the types later in the code
The text was updated successfully, but these errors were encountered: