Added the generic type T to the annotations to avoid type loss during the component instance creating.
Example of the solved problem:
-- some component
---@class pocket_view: druid.base_component
...
-- some class property
---@field pocket_view pocket_view
...
-- assigning
self.pocket_view = self.druid:new(PocketView, 'pocket')
-- Warning that the returned class druid.base_component is not the expected pocket_view
...
Added the generic type T to the annotations to avoid type loss during the component instance creating.
Example of the solved problem: