Skip to content

Commit 1860d59

Browse files
committed
fix: resolve "Argument of type 'string | undefined' is not assignable to parameter of type 'string'" warning
1 parent e526efd commit 1860d59

File tree

44 files changed

+131
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+131
-134
lines changed

packages/coreui-vue/src/components/accordion/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { CAccordionItem } from './CAccordionItem'
77

88
const CAccordionPlugin = {
99
install: (app: App): void => {
10-
app.component(CAccordion.name, CAccordion)
11-
app.component(CAccordionBody.name, CAccordionBody)
12-
app.component(CAccordionButton.name, CAccordionButton)
13-
app.component(CAccordionHeader.name, CAccordionHeader)
14-
app.component(CAccordionItem.name, CAccordionItem)
10+
app.component(CAccordion.name as string, CAccordion)
11+
app.component(CAccordionBody.name as string, CAccordionBody)
12+
app.component(CAccordionButton.name as string, CAccordionButton)
13+
app.component(CAccordionHeader.name as string, CAccordionHeader)
14+
app.component(CAccordionItem.name as string, CAccordionItem)
1515
},
1616
}
1717

packages/coreui-vue/src/components/alert/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { CAlertLink } from './CAlertLink'
55

66
const CAlertPlugin = {
77
install: (app: App): void => {
8-
app.component(CAlert.name, CAlert)
9-
app.component(CAlertHeading.name, CAlertHeading)
10-
app.component(CAlertLink.name, CAlertLink)
8+
app.component(CAlert.name as string, CAlert)
9+
app.component(CAlertHeading.name as string, CAlertHeading)
10+
app.component(CAlertLink.name as string, CAlertLink)
1111
},
1212
}
1313

packages/coreui-vue/src/components/avatar/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CAvatar } from './CAvatar'
33

44
const CAvatarPlugin = {
55
install: (app: App): void => {
6-
app.component(CAvatar.name, CAvatar)
6+
app.component(CAvatar.name as string, CAvatar)
77
},
88
}
99

packages/coreui-vue/src/components/backdrop/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CBackdrop } from './CBackdrop'
33

44
const CBackdropPlugin = {
55
install: (app: App): void => {
6-
app.component(CBackdrop.name, CBackdrop)
6+
app.component(CBackdrop.name as string, CBackdrop)
77
},
88
}
99

packages/coreui-vue/src/components/badge/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CBadge } from './CBadge'
33

44
const CBadgePlugin = {
55
install: (app: App): void => {
6-
app.component(CBadge.name, CBadge)
6+
app.component(CBadge.name as string, CBadge)
77
},
88
}
99

packages/coreui-vue/src/components/breadcrumb/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { CBreadcrumb } from './CBreadcrumb'
44

55
const CBreadcrumbPlugin = {
66
install: (app: App): void => {
7-
app.component(CBreadcrumb.name, CBreadcrumb)
8-
app.component(CBreadcrumbItem.name, CBreadcrumbItem)
7+
app.component(CBreadcrumb.name as string, CBreadcrumb)
8+
app.component(CBreadcrumbItem.name as string, CBreadcrumbItem)
99
},
1010
}
1111

packages/coreui-vue/src/components/button-group/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { CButtonGroup } from './CButtonGroup'
44

55
const CButtonGroupPlugin = {
66
install: (app: App): void => {
7-
app.component(CButtonToolbar.name, CButtonToolbar)
8-
app.component(CButtonGroup.name, CButtonGroup)
7+
app.component(CButtonToolbar.name as string, CButtonToolbar)
8+
app.component(CButtonGroup.name as string, CButtonGroup)
99
},
1010
}
1111

packages/coreui-vue/src/components/button/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CButton } from './CButton'
33

44
const CButtonPlugin = {
55
install: (app: App): void => {
6-
app.component(CButton.name, CButton)
6+
app.component(CButton.name as string, CButton)
77
},
88
}
99

packages/coreui-vue/src/components/callout/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CCallout } from './CCallout'
33

44
const CCalloutPlugin = {
55
install: (app: App): void => {
6-
app.component(CCallout.name, CCallout)
6+
app.component(CCallout.name as string, CCallout)
77
},
88
}
99

packages/coreui-vue/src/components/card/index.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ import { CCardTitle } from './CCardTitle'
1313

1414
const CCardPlugin = {
1515
install: (app: App): void => {
16-
app.component(CCard.name, CCard)
17-
app.component(CCardBody.name, CCardBody)
18-
app.component(CCardFooter.name, CCardFooter)
19-
app.component(CCardGroup.name, CCardGroup)
20-
app.component(CCardHeader.name, CCardHeader)
21-
app.component(CCardImage.name, CCardImage)
22-
app.component(CCardImageOverlay.name, CCardImageOverlay)
23-
app.component(CCardLink.name, CCardLink)
24-
app.component(CCardSubtitle.name, CCardSubtitle)
25-
app.component(CCardText.name, CCardText)
26-
app.component(CCardTitle.name, CCardTitle)
16+
app.component(CCard.name as string, CCard)
17+
app.component(CCardBody.name as string, CCardBody)
18+
app.component(CCardFooter.name as string, CCardFooter)
19+
app.component(CCardGroup.name as string, CCardGroup)
20+
app.component(CCardHeader.name as string, CCardHeader)
21+
app.component(CCardImage.name as string, CCardImage)
22+
app.component(CCardImageOverlay.name as string, CCardImageOverlay)
23+
app.component(CCardLink.name as string, CCardLink)
24+
app.component(CCardSubtitle.name as string, CCardSubtitle)
25+
app.component(CCardText.name as string, CCardText)
26+
app.component(CCardTitle.name as string, CCardTitle)
2727
},
2828
}
2929

packages/coreui-vue/src/components/carousel/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { CCarouselItem } from './CCarouselItem'
55

66
const CCarouselPlugin = {
77
install: (app: App): void => {
8-
app.component(CCarousel.name, CCarousel)
9-
app.component(CCarouselCaption.name, CCarouselCaption)
10-
app.component(CCarouselItem.name, CCarouselItem)
8+
app.component(CCarousel.name as string, CCarousel)
9+
app.component(CCarouselCaption.name as string, CCarouselCaption)
10+
app.component(CCarouselItem.name as string, CCarouselItem)
1111
},
1212
}
1313

packages/coreui-vue/src/components/close-button/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CCloseButton } from './CCloseButton'
33

44
const CCloseButtonPlugin = {
55
install: (app: App): void => {
6-
app.component(CCloseButton.name, CCloseButton)
6+
app.component(CCloseButton.name as string, CCloseButton)
77
},
88
}
99

packages/coreui-vue/src/components/collapse/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CCollapse } from './CCollapse'
33

44
const CCollapsePlugin = {
55
install: (app: App): void => {
6-
app.component(CCollapse.name, CCollapse)
6+
app.component(CCollapse.name as string, CCollapse)
77
},
88
}
99

packages/coreui-vue/src/components/conditional-teleport/CConditionalTeleport.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const CConditionalTeleport = defineComponent({
1616
/**
1717
* An HTML element or function that returns a single element, with `document.body` as the default.
1818
*
19-
* @since v5.0.0-rc.2
19+
* @since v5.0.0-rc.3
2020
*/
2121
container: {
2222
type: [Object, String] as PropType<HTMLElement | (() => HTMLElement) | string>,

packages/coreui-vue/src/components/conditional-teleport/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CConditionalTeleport } from './CConditionalTeleport'
33

44
const CConditionalTeleportPlugin = {
55
install: (app: App): void => {
6-
app.component(CConditionalTeleport.name, CConditionalTeleport)
6+
app.component(CConditionalTeleport.name as string, CConditionalTeleport)
77
},
88
}
99

packages/coreui-vue/src/components/dropdown/CDropdown.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const CDropdown = defineComponent({
6262
/**
6363
* 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`.
6464
*
65-
* @since v5.0.0-rc.2
65+
* @since v5.0.0-rc.3
6666
*/
6767
container: {
6868
type: [Object, String] as PropType<HTMLElement | (() => HTMLElement) | string>,
@@ -115,7 +115,7 @@ const CDropdown = defineComponent({
115115
/**
116116
* Generates dropdown menu using Teleport.
117117
*
118-
* @since v5.0.0-rc.2
118+
* @since v5.0.0-rc.3
119119
*/
120120
teleport: {
121121
type: Boolean,

packages/coreui-vue/src/components/dropdown/CDropdownToggle.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const CDropdownToggle = defineComponent({
4949
/**
5050
* If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button.
5151
*
52-
* @since v5.0.0-rc.2
52+
* @since v5.0.0-rc.3
5353
*/
5454
navLink: {
5555
type: Boolean,

packages/coreui-vue/src/components/dropdown/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { CDropdownToggle } from './CDropdownToggle'
88

99
const CDropdownPlugin = {
1010
install: (app: App): void => {
11-
app.component(CDropdown.name, CDropdown)
12-
app.component(CDropdownItem.name, CDropdownItem)
13-
app.component(CDropdownHeader.name, CDropdownHeader)
14-
app.component(CDropdownDivider.name, CDropdownDivider)
15-
app.component(CDropdownMenu.name, CDropdownMenu)
16-
app.component(CDropdownToggle.name, CDropdownToggle)
11+
app.component(CDropdown.name as string, CDropdown)
12+
app.component(CDropdownItem.name as string, CDropdownItem)
13+
app.component(CDropdownHeader.name as string, CDropdownHeader)
14+
app.component(CDropdownDivider.name as string, CDropdownDivider)
15+
app.component(CDropdownMenu.name as string, CDropdownMenu)
16+
app.component(CDropdownToggle.name as string, CDropdownToggle)
1717
},
1818
}
1919

packages/coreui-vue/src/components/footer/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CFooter } from './CFooter'
33

44
const CFooterPlugin = {
55
install: (app: App): void => {
6-
app.component(CFooter.name, CFooter)
6+
app.component(CFooter.name as string, CFooter)
77
},
88
}
99

packages/coreui-vue/src/components/form/index.ts

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { App } from 'vue'
22
import { CForm } from './CForm'
33
import { CFormCheck } from './CFormCheck'
4-
// import { CFormControl } from './CFormControl'
54
import { CFormFeedback } from './CFormFeedback'
65
import { CFormFloating } from './CFormFloating'
76
import { CFormInput } from './CFormInput'
@@ -16,28 +15,26 @@ import { CInputGroupText } from './CInputGroupText'
1615

1716
const CFormPlugin = {
1817
install: (app: App): void => {
19-
app.component(CForm.name, CForm)
20-
app.component(CFormCheck.name, CFormCheck)
21-
// app.component(CFormControl.name, CFormControl)
22-
app.component(CFormFeedback.name, CFormFeedback)
23-
app.component(CFormFloating.name, CFormFloating)
24-
app.component(CFormInput.name, CFormInput)
25-
app.component(CFormLabel.name, CFormLabel)
26-
app.component(CFormRange.name, CFormRange)
27-
app.component(CFormSelect.name, CFormSelect)
28-
app.component(CFormSwitch.name, CFormSwitch)
29-
app.component(CFormText.name, CFormText)
30-
app.component(CFormTextarea.name, CFormTextarea)
31-
app.component(CInputGroup.name, CInputGroup)
32-
app.component(CInputGroupText.name, CInputGroupText)
18+
app.component(CForm.name as string, CForm)
19+
app.component(CFormCheck.name as string, CFormCheck)
20+
app.component(CFormFeedback.name as string, CFormFeedback)
21+
app.component(CFormFloating.name as string, CFormFloating)
22+
app.component(CFormInput.name as string, CFormInput)
23+
app.component(CFormLabel.name as string, CFormLabel)
24+
app.component(CFormRange.name as string, CFormRange)
25+
app.component(CFormSelect.name as string, CFormSelect)
26+
app.component(CFormSwitch.name as string, CFormSwitch)
27+
app.component(CFormText.name as string, CFormText)
28+
app.component(CFormTextarea.name as string, CFormTextarea)
29+
app.component(CInputGroup.name as string, CInputGroup)
30+
app.component(CInputGroupText.name as string, CInputGroupText)
3331
},
3432
}
3533

3634
export {
3735
CFormPlugin,
3836
CForm,
3937
CFormCheck,
40-
// CFormControl,
4138
CFormFeedback,
4239
CFormFloating,
4340
CFormInput,

packages/coreui-vue/src/components/grid/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { CRow } from './CRow'
55

66
const CGridPlugin = {
77
install: (app: App): void => {
8-
app.component(CCol.name, CCol)
9-
app.component(CContainer.name, CContainer)
10-
app.component(CRow.name, CRow)
8+
app.component(CCol.name as string, CCol)
9+
app.component(CContainer.name as string, CContainer)
10+
app.component(CRow.name as string, CRow)
1111
},
1212
}
1313
export { CGridPlugin, CCol, CContainer, CRow }

packages/coreui-vue/src/components/header/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { CHeaderToggler } from './CHeaderToggler'
88

99
const CHeaderPlugin = {
1010
install: (app: App): void => {
11-
app.component(CHeader.name, CHeader)
12-
app.component(CHeaderBrand.name, CHeaderBrand)
13-
app.component(CHeaderDivider.name, CHeaderDivider)
14-
app.component(CHeaderNav.name, CHeaderNav)
15-
app.component(CHeaderText.name, CHeaderText)
16-
app.component(CHeaderToggler.name, CHeaderToggler)
11+
app.component(CHeader.name as string, CHeader)
12+
app.component(CHeaderBrand.name as string, CHeaderBrand)
13+
app.component(CHeaderDivider.name as string, CHeaderDivider)
14+
app.component(CHeaderNav.name as string, CHeaderNav)
15+
app.component(CHeaderText.name as string, CHeaderText)
16+
app.component(CHeaderToggler.name as string, CHeaderToggler)
1717
},
1818
}
1919

packages/coreui-vue/src/components/image/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CImage } from './CImage'
33

44
const CImagePlugin = {
55
install: (app: App): void => {
6-
app.component(CImage.name, CImage)
6+
app.component(CImage.name as string, CImage)
77
},
88
}
99

packages/coreui-vue/src/components/link/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CLink } from './CLink'
33

44
const CCLinkPlugin = {
55
install: (app: App): void => {
6-
app.component(CLink.name, CLink)
6+
app.component(CLink.name as string, CLink)
77
},
88
}
99

packages/coreui-vue/src/components/list-group/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { CListGroupItem } from './CListGroupItem'
44

55
const CListGroupPlugin = {
66
install: (app: App): void => {
7-
app.component(CListGroup.name, CListGroup)
8-
app.component(CListGroupItem.name, CListGroupItem)
7+
app.component(CListGroup.name as string, CListGroup)
8+
app.component(CListGroupItem.name as string, CListGroupItem)
99
},
1010
}
1111

packages/coreui-vue/src/components/modal/CModal.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const CModal = defineComponent({
5454
/**
5555
* Puts the focus on the modal when shown.
5656
*
57-
* @since v5.0.0-rc.2
57+
* @since v5.0.0-rc.3
5858
*/
5959
focus: {
6060
type: Boolean,

packages/coreui-vue/src/components/modal/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { CModalTitle } from './CModalTitle'
77

88
const CModalPlugin = {
99
install: (app: App): void => {
10-
app.component(CModal.name, CModal)
11-
app.component(CModalBody.name, CModalBody)
12-
app.component(CModalFooter.name, CModalFooter)
13-
app.component(CModalHeader.name, CModalHeader)
14-
app.component(CModalTitle.name, CModalTitle)
10+
app.component(CModal.name as string, CModal)
11+
app.component(CModalBody.name as string, CModalBody)
12+
app.component(CModalFooter.name as string, CModalFooter)
13+
app.component(CModalHeader.name as string, CModalHeader)
14+
app.component(CModalTitle.name as string, CModalTitle)
1515
},
1616
}
1717

packages/coreui-vue/src/components/nav/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { CNavTitle } from './CNavTitle'
88

99
const CNavPlugin = {
1010
install: (app: App): void => {
11-
app.component(CNav.name, CNav)
12-
app.component(CNavGroup.name, CNavGroup)
13-
app.component(CNavGroupItems.name, CNavGroupItems)
14-
app.component(CNavItem.name, CNavItem)
15-
app.component(CNavLink.name, CNavLink)
16-
app.component(CNavTitle.name, CNavTitle)
11+
app.component(CNav.name as string, CNav)
12+
app.component(CNavGroup.name as string, CNavGroup)
13+
app.component(CNavGroupItems.name as string, CNavGroupItems)
14+
app.component(CNavItem.name as string, CNavItem)
15+
app.component(CNavLink.name as string, CNavLink)
16+
app.component(CNavTitle.name as string, CNavTitle)
1717
},
1818
}
1919

0 commit comments

Comments
 (0)