igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Export interfaces that are used in outputs

Open yl-endress opened this issue 7 months ago • 1 comments

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

Image

Image

The source shows that the interface is not exported at all Image

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];

yl-endress avatar Jun 17 '25 09:06 yl-endress

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:

Image

yl-endress avatar Jun 17 '25 12:06 yl-endress

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Aug 24 '25 00:08 github-actions[bot]