Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing types on some components #72

Closed
Fredx87 opened this issue Jul 3, 2019 · 2 comments
Closed

Missing types on some components #72

Fredx87 opened this issue Jul 3, 2019 · 2 comments

Comments

@Fredx87
Copy link

Fredx87 commented Jul 3, 2019

The AppSidebarNavComponent accepts an array of navItems that are typed as any:

@Input() navItems: Array<any>;

This is bad for typechecking, IDE support, and documentation: it's difficult to understand what you have to pass to the component. I've found the types of these items in the main project: https://github.com/coreui/coreui-free-angular-admin-template/blob/master/src/app/_nav.ts but I think that these types should be added here.

The same issue is present in other components, for example this is the definition of some inputs in the AppHeaderComponent:

@Input() navbarBrand: any;
@Input() navbarBrandFull: any;
@Input() navbarBrandMinimized: any;
@Input() navbarBrandText: any = {icon: '🅲', text: '🅲 CoreUI'};
@Input() navbarBrandHref: ''; // deprecated, use navbarBrandRouterLink instead
@Input() navbarBrandRouterLink: any[] | string = '';
@xidedix
Copy link
Member

xidedix commented Jul 3, 2019

Hi @Fredx87
You're right. We are going to improve types in @coreui/angular v3.

@github-actions
Copy link

github-actions bot commented May 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants