avmaisak/ngx-bootstrap-icons

Support for Icon and Theme Types

Closed this issue · 2 comments

This is for an optional feature that can be supported because of Angulars 'fullTemplateTypeCheck' mode, which provides enhanced autocomplete features for type safety in the html templates.

Earlier I submitted an issue for using optional Enums, which were helpful in narrowing down what options where available and avoiding typos, the downside is that one would have to import the enums and assign them to a variable to make use of them

i.e

iconEnums = IconEnums

My proposal is to add support for a custom IconName Type

i.e

export type IconName

and allow it as an optional input type.

The benefit will be that the user will not need to import and assign anything anymore, angular language service should autocomplete from a list of specified strings if fullTemplateTypeCheck is enabled.

By adding this feature as an option, current users will not need to do any migration work.

I am willing to do the pull request for this.

@tayambamwanza it will be great! I will bi waitng for PR