Skip to content

Commit

Permalink
fix: resolve "Argument of type 'string | undefined' is not assignable…
Browse files Browse the repository at this point in the history
… to parameter of type 'string'" warning
  • Loading branch information
mrholek committed Mar 23, 2024
1 parent e526efd commit 1860d59
Show file tree
Hide file tree
Showing 44 changed files with 131 additions and 134 deletions.
10 changes: 5 additions & 5 deletions packages/coreui-vue/src/components/accordion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { CAccordionItem } from './CAccordionItem'

const CAccordionPlugin = {
install: (app: App): void => {
app.component(CAccordion.name, CAccordion)
app.component(CAccordionBody.name, CAccordionBody)
app.component(CAccordionButton.name, CAccordionButton)
app.component(CAccordionHeader.name, CAccordionHeader)
app.component(CAccordionItem.name, CAccordionItem)
app.component(CAccordion.name as string, CAccordion)
app.component(CAccordionBody.name as string, CAccordionBody)
app.component(CAccordionButton.name as string, CAccordionButton)
app.component(CAccordionHeader.name as string, CAccordionHeader)
app.component(CAccordionItem.name as string, CAccordionItem)
},
}

Expand Down
6 changes: 3 additions & 3 deletions packages/coreui-vue/src/components/alert/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { CAlertLink } from './CAlertLink'

const CAlertPlugin = {
install: (app: App): void => {
app.component(CAlert.name, CAlert)
app.component(CAlertHeading.name, CAlertHeading)
app.component(CAlertLink.name, CAlertLink)
app.component(CAlert.name as string, CAlert)
app.component(CAlertHeading.name as string, CAlertHeading)
app.component(CAlertLink.name as string, CAlertLink)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/avatar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CAvatar } from './CAvatar'

const CAvatarPlugin = {
install: (app: App): void => {
app.component(CAvatar.name, CAvatar)
app.component(CAvatar.name as string, CAvatar)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/backdrop/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CBackdrop } from './CBackdrop'

const CBackdropPlugin = {
install: (app: App): void => {
app.component(CBackdrop.name, CBackdrop)
app.component(CBackdrop.name as string, CBackdrop)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/badge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CBadge } from './CBadge'

const CBadgePlugin = {
install: (app: App): void => {
app.component(CBadge.name, CBadge)
app.component(CBadge.name as string, CBadge)
},
}

Expand Down
4 changes: 2 additions & 2 deletions packages/coreui-vue/src/components/breadcrumb/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { CBreadcrumb } from './CBreadcrumb'

const CBreadcrumbPlugin = {
install: (app: App): void => {
app.component(CBreadcrumb.name, CBreadcrumb)
app.component(CBreadcrumbItem.name, CBreadcrumbItem)
app.component(CBreadcrumb.name as string, CBreadcrumb)
app.component(CBreadcrumbItem.name as string, CBreadcrumbItem)
},
}

Expand Down
4 changes: 2 additions & 2 deletions packages/coreui-vue/src/components/button-group/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { CButtonGroup } from './CButtonGroup'

const CButtonGroupPlugin = {
install: (app: App): void => {
app.component(CButtonToolbar.name, CButtonToolbar)
app.component(CButtonGroup.name, CButtonGroup)
app.component(CButtonToolbar.name as string, CButtonToolbar)
app.component(CButtonGroup.name as string, CButtonGroup)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CButton } from './CButton'

const CButtonPlugin = {
install: (app: App): void => {
app.component(CButton.name, CButton)
app.component(CButton.name as string, CButton)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/callout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CCallout } from './CCallout'

const CCalloutPlugin = {
install: (app: App): void => {
app.component(CCallout.name, CCallout)
app.component(CCallout.name as string, CCallout)
},
}

Expand Down
22 changes: 11 additions & 11 deletions packages/coreui-vue/src/components/card/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import { CCardTitle } from './CCardTitle'

const CCardPlugin = {
install: (app: App): void => {
app.component(CCard.name, CCard)
app.component(CCardBody.name, CCardBody)
app.component(CCardFooter.name, CCardFooter)
app.component(CCardGroup.name, CCardGroup)
app.component(CCardHeader.name, CCardHeader)
app.component(CCardImage.name, CCardImage)
app.component(CCardImageOverlay.name, CCardImageOverlay)
app.component(CCardLink.name, CCardLink)
app.component(CCardSubtitle.name, CCardSubtitle)
app.component(CCardText.name, CCardText)
app.component(CCardTitle.name, CCardTitle)
app.component(CCard.name as string, CCard)
app.component(CCardBody.name as string, CCardBody)
app.component(CCardFooter.name as string, CCardFooter)
app.component(CCardGroup.name as string, CCardGroup)
app.component(CCardHeader.name as string, CCardHeader)
app.component(CCardImage.name as string, CCardImage)
app.component(CCardImageOverlay.name as string, CCardImageOverlay)
app.component(CCardLink.name as string, CCardLink)
app.component(CCardSubtitle.name as string, CCardSubtitle)
app.component(CCardText.name as string, CCardText)
app.component(CCardTitle.name as string, CCardTitle)
},
}

Expand Down
6 changes: 3 additions & 3 deletions packages/coreui-vue/src/components/carousel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { CCarouselItem } from './CCarouselItem'

const CCarouselPlugin = {
install: (app: App): void => {
app.component(CCarousel.name, CCarousel)
app.component(CCarouselCaption.name, CCarouselCaption)
app.component(CCarouselItem.name, CCarouselItem)
app.component(CCarousel.name as string, CCarousel)
app.component(CCarouselCaption.name as string, CCarouselCaption)
app.component(CCarouselItem.name as string, CCarouselItem)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/close-button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CCloseButton } from './CCloseButton'

const CCloseButtonPlugin = {
install: (app: App): void => {
app.component(CCloseButton.name, CCloseButton)
app.component(CCloseButton.name as string, CCloseButton)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/collapse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CCollapse } from './CCollapse'

const CCollapsePlugin = {
install: (app: App): void => {
app.component(CCollapse.name, CCollapse)
app.component(CCollapse.name as string, CCollapse)
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CConditionalTeleport = defineComponent({
/**
* An HTML element or function that returns a single element, with `document.body` as the default.
*
* @since v5.0.0-rc.2
* @since v5.0.0-rc.3
*/
container: {
type: [Object, String] as PropType<HTMLElement | (() => HTMLElement) | string>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CConditionalTeleport } from './CConditionalTeleport'

const CConditionalTeleportPlugin = {
install: (app: App): void => {
app.component(CConditionalTeleport.name, CConditionalTeleport)
app.component(CConditionalTeleport.name as string, CConditionalTeleport)
},
}

Expand Down
4 changes: 2 additions & 2 deletions packages/coreui-vue/src/components/dropdown/CDropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const CDropdown = defineComponent({
/**
* Appends the vue dropdown menu to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`.
*
* @since v5.0.0-rc.2
* @since v5.0.0-rc.3
*/
container: {
type: [Object, String] as PropType<HTMLElement | (() => HTMLElement) | string>,
Expand Down Expand Up @@ -115,7 +115,7 @@ const CDropdown = defineComponent({
/**
* Generates dropdown menu using Teleport.
*
* @since v5.0.0-rc.2
* @since v5.0.0-rc.3
*/
teleport: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const CDropdownToggle = defineComponent({
/**
* If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button.
*
* @since v5.0.0-rc.2
* @since v5.0.0-rc.3
*/
navLink: {
type: Boolean,
Expand Down
12 changes: 6 additions & 6 deletions packages/coreui-vue/src/components/dropdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { CDropdownToggle } from './CDropdownToggle'

const CDropdownPlugin = {
install: (app: App): void => {
app.component(CDropdown.name, CDropdown)
app.component(CDropdownItem.name, CDropdownItem)
app.component(CDropdownHeader.name, CDropdownHeader)
app.component(CDropdownDivider.name, CDropdownDivider)
app.component(CDropdownMenu.name, CDropdownMenu)
app.component(CDropdownToggle.name, CDropdownToggle)
app.component(CDropdown.name as string, CDropdown)
app.component(CDropdownItem.name as string, CDropdownItem)
app.component(CDropdownHeader.name as string, CDropdownHeader)
app.component(CDropdownDivider.name as string, CDropdownDivider)
app.component(CDropdownMenu.name as string, CDropdownMenu)
app.component(CDropdownToggle.name as string, CDropdownToggle)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/footer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CFooter } from './CFooter'

const CFooterPlugin = {
install: (app: App): void => {
app.component(CFooter.name, CFooter)
app.component(CFooter.name as string, CFooter)
},
}

Expand Down
29 changes: 13 additions & 16 deletions packages/coreui-vue/src/components/form/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { App } from 'vue'
import { CForm } from './CForm'
import { CFormCheck } from './CFormCheck'
// import { CFormControl } from './CFormControl'
import { CFormFeedback } from './CFormFeedback'
import { CFormFloating } from './CFormFloating'
import { CFormInput } from './CFormInput'
Expand All @@ -16,28 +15,26 @@ import { CInputGroupText } from './CInputGroupText'

const CFormPlugin = {
install: (app: App): void => {
app.component(CForm.name, CForm)
app.component(CFormCheck.name, CFormCheck)
// app.component(CFormControl.name, CFormControl)
app.component(CFormFeedback.name, CFormFeedback)
app.component(CFormFloating.name, CFormFloating)
app.component(CFormInput.name, CFormInput)
app.component(CFormLabel.name, CFormLabel)
app.component(CFormRange.name, CFormRange)
app.component(CFormSelect.name, CFormSelect)
app.component(CFormSwitch.name, CFormSwitch)
app.component(CFormText.name, CFormText)
app.component(CFormTextarea.name, CFormTextarea)
app.component(CInputGroup.name, CInputGroup)
app.component(CInputGroupText.name, CInputGroupText)
app.component(CForm.name as string, CForm)
app.component(CFormCheck.name as string, CFormCheck)
app.component(CFormFeedback.name as string, CFormFeedback)
app.component(CFormFloating.name as string, CFormFloating)
app.component(CFormInput.name as string, CFormInput)
app.component(CFormLabel.name as string, CFormLabel)
app.component(CFormRange.name as string, CFormRange)
app.component(CFormSelect.name as string, CFormSelect)
app.component(CFormSwitch.name as string, CFormSwitch)
app.component(CFormText.name as string, CFormText)
app.component(CFormTextarea.name as string, CFormTextarea)
app.component(CInputGroup.name as string, CInputGroup)
app.component(CInputGroupText.name as string, CInputGroupText)
},
}

export {
CFormPlugin,
CForm,
CFormCheck,
// CFormControl,
CFormFeedback,
CFormFloating,
CFormInput,
Expand Down
6 changes: 3 additions & 3 deletions packages/coreui-vue/src/components/grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { CRow } from './CRow'

const CGridPlugin = {
install: (app: App): void => {
app.component(CCol.name, CCol)
app.component(CContainer.name, CContainer)
app.component(CRow.name, CRow)
app.component(CCol.name as string, CCol)
app.component(CContainer.name as string, CContainer)
app.component(CRow.name as string, CRow)
},
}
export { CGridPlugin, CCol, CContainer, CRow }
12 changes: 6 additions & 6 deletions packages/coreui-vue/src/components/header/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { CHeaderToggler } from './CHeaderToggler'

const CHeaderPlugin = {
install: (app: App): void => {
app.component(CHeader.name, CHeader)
app.component(CHeaderBrand.name, CHeaderBrand)
app.component(CHeaderDivider.name, CHeaderDivider)
app.component(CHeaderNav.name, CHeaderNav)
app.component(CHeaderText.name, CHeaderText)
app.component(CHeaderToggler.name, CHeaderToggler)
app.component(CHeader.name as string, CHeader)
app.component(CHeaderBrand.name as string, CHeaderBrand)
app.component(CHeaderDivider.name as string, CHeaderDivider)
app.component(CHeaderNav.name as string, CHeaderNav)
app.component(CHeaderText.name as string, CHeaderText)
app.component(CHeaderToggler.name as string, CHeaderToggler)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CImage } from './CImage'

const CImagePlugin = {
install: (app: App): void => {
app.component(CImage.name, CImage)
app.component(CImage.name as string, CImage)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/link/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CLink } from './CLink'

const CCLinkPlugin = {
install: (app: App): void => {
app.component(CLink.name, CLink)
app.component(CLink.name as string, CLink)
},
}

Expand Down
4 changes: 2 additions & 2 deletions packages/coreui-vue/src/components/list-group/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { CListGroupItem } from './CListGroupItem'

const CListGroupPlugin = {
install: (app: App): void => {
app.component(CListGroup.name, CListGroup)
app.component(CListGroupItem.name, CListGroupItem)
app.component(CListGroup.name as string, CListGroup)
app.component(CListGroupItem.name as string, CListGroupItem)
},
}

Expand Down
2 changes: 1 addition & 1 deletion packages/coreui-vue/src/components/modal/CModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CModal = defineComponent({
/**
* Puts the focus on the modal when shown.
*
* @since v5.0.0-rc.2
* @since v5.0.0-rc.3
*/
focus: {
type: Boolean,
Expand Down
10 changes: 5 additions & 5 deletions packages/coreui-vue/src/components/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { CModalTitle } from './CModalTitle'

const CModalPlugin = {
install: (app: App): void => {
app.component(CModal.name, CModal)
app.component(CModalBody.name, CModalBody)
app.component(CModalFooter.name, CModalFooter)
app.component(CModalHeader.name, CModalHeader)
app.component(CModalTitle.name, CModalTitle)
app.component(CModal.name as string, CModal)
app.component(CModalBody.name as string, CModalBody)
app.component(CModalFooter.name as string, CModalFooter)
app.component(CModalHeader.name as string, CModalHeader)
app.component(CModalTitle.name as string, CModalTitle)
},
}

Expand Down
12 changes: 6 additions & 6 deletions packages/coreui-vue/src/components/nav/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { CNavTitle } from './CNavTitle'

const CNavPlugin = {
install: (app: App): void => {
app.component(CNav.name, CNav)
app.component(CNavGroup.name, CNavGroup)
app.component(CNavGroupItems.name, CNavGroupItems)
app.component(CNavItem.name, CNavItem)
app.component(CNavLink.name, CNavLink)
app.component(CNavTitle.name, CNavTitle)
app.component(CNav.name as string, CNav)
app.component(CNavGroup.name as string, CNavGroup)
app.component(CNavGroupItems.name as string, CNavGroupItems)
app.component(CNavItem.name as string, CNavItem)
app.component(CNavLink.name as string, CNavLink)
app.component(CNavTitle.name as string, CNavTitle)
},
}

Expand Down
Loading

0 comments on commit 1860d59

Please sign in to comment.