You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have reported a similar problem before and I understand that it is not simple, but if you solve it, I will be crazy happy!
I'm working on an OOP library and here's a truncated example of the constructor it uses:
---@genericT---@paramt1T---@paramt2T---@returnTfunctionnew(t1, t2) end
The first table here is the class from which the instance will inherit, and the second is the additional settings that will be substituted to the instance. So all tables has the same type.
When I call this constructor, the generics work almost correctly - the result of this function has the same type as any argument:
---@classExample1---@fielde1astring---@fielde1bstringlocalExample1= {}
---@classExample2---@fielde2astring---@fielde2bstringlocalExample2= {}
locale=new(Example1, {}) -- e is Example1locale=new(Example2, {}) -- e is Example2locale=new({}, Example1) -- e is Example1locale=new({}, Example2) -- e is Example2
But the problem is that when I start typing a text between the curly braces in the example above, I get no hints about the class fields. Maybe I'm describing generics wrong? Do you have any idea? Thanks!
The text was updated successfully, but these errors were encountered:
I have reported a similar problem before and I understand that it is not simple, but if you solve it, I will be crazy happy!
I'm working on an OOP library and here's a truncated example of the constructor it uses:
The first table here is the class from which the instance will inherit, and the second is the additional settings that will be substituted to the instance. So all tables has the same type.
When I call this constructor, the generics work almost correctly - the result of this function has the same type as any argument:
But the problem is that when I start typing a text between the curly braces in the example above, I get no hints about the class fields. Maybe I'm describing generics wrong? Do you have any idea? Thanks!
The text was updated successfully, but these errors were encountered: