coreui-vue icon indicating copy to clipboard operation
coreui-vue copied to clipboard

`CNavItem.as` is now a required property

Open abompard opened this issue 1 year ago • 0 comments

Hey!

Since the last couple refactors on CNavItem, the as property as become mandatory in Typescript:

image

The first CNavItem on line 14 has a as, the second one on line 19 doesn't and trigger a type check error. I think it's coming from the recent refactors on packages/coreui-vue/src/components/nav/CNavItem.ts

The actual console type check error is:

 src/components/AdminSubHeader.vue:19:6 - error TS2345: Argument of type '{}' is not assignable to parameter of type '(Partial<{} | { [x: string]: any; }> & Omit<{ readonly as: string; readonly disabled?: boolean | undefined; readonly active?: boolean | undefined; readonly href?: string | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>) & Record<...>'.

19     <CNavItem>
        ~~~~~~~~

abompard avatar Oct 14 '24 08:10 abompard