Export interfaces that are used in outputs
Description
Currently, some interfaces that are used in outputs are not exported at all. By this, they cannot be used as types directly
- igniteui-angular version: 20.0.1
- browser: Independent
Steps to reproduce
use the igx-simple-combo and the output-function closing() Note: this is 1 example, that is also valid for other outputs
Result
I am getting an error, as the type IBaseCancelableBrowserEventArgs cannot be imported, as it is not exported/provided by the lib
Expected result
All output-interfaces are exported to be able to use type-safeness of typescript, like IBaseCancelableBrowserEventArgs
Attachments
The source shows that the interface is not exported at all
Note
I just noticed that we also use the interface IgxComboItemComponent for custom templates, which is not exposed at all. It would be nice if you can expose it, too. Currently, we access the type by this syntax: export type IgxComboItemComponent = IgxComboComponent["dropdown"]["items"][0];
For anyone else with this issue: As workaround the generic type can be extracted from the output by using some typescript magic:
type ExtractGeneric<T> = T extends EventEmitter<infer U> ? U : never; type IBaseCancelableBrowserEventArgs = ExtractGeneric<IgxSimpleComboComponent["closing"]>
The IDE understand it and will show than the correct type:
There has been no recent activity and this issue has been marked inactive.