mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore: remove trailing semicolono from jsdoc types
This commit is contained in:
parent
7abde79688
commit
a10693659e
12 changed files with 22 additions and 24 deletions
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the display of a combobox item
|
* Override the display of a combobox item
|
||||||
* @type {(item: ComboBoxItem) => string;} [itemToString = (item: ComboBoxItem) => string;]
|
* @type {(item: ComboBoxItem) => string} [itemToString = (item: ComboBoxItem) => string]
|
||||||
*/
|
*/
|
||||||
export let itemToString = (item) => item.text || item.id;
|
export let itemToString = (item) => item.text || item.id;
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default translation ids
|
* Override the default translation ids
|
||||||
* @type {(id: any) => string;} [translateWithId]
|
* @type {(id: any) => string} [translateWithId]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = undefined;
|
export let translateWithId = undefined;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default id translations
|
* Override the default id translations
|
||||||
* @type {() => string;} [translateWithId = () => "";]
|
* @type {() => string} [translateWithId = () => ""]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = () => "";
|
export let translateWithId = () => "";
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the display of a dropdown item
|
* Override the display of a dropdown item
|
||||||
* @type {(item: DropdownItem) => string;} [itemToString = (item: DropdownItem) => DropdownItemText | DropdownItemId;]
|
* @type {(item: DropdownItem) => string} [itemToString = (item: DropdownItem) => DropdownItemText | DropdownItemId]
|
||||||
*/
|
*/
|
||||||
export let itemToString = (item) => item.text || item.id;
|
export let itemToString = (item) => item.text || item.id;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default translation ids
|
* Override the default translation ids
|
||||||
* @type {(id: any) => string;} [translateWithId]
|
* @type {(id: any) => string} [translateWithId]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = undefined;
|
export let translateWithId = undefined;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default behavior of clearing the array of uploaded files
|
* Override the default behavior of clearing the array of uploaded files
|
||||||
* @type {() => any;} [clearFiles = () => void;]
|
* @type {() => any} [clearFiles = () => void]
|
||||||
*/
|
*/
|
||||||
export const clearFiles = () => {
|
export const clearFiles = () => {
|
||||||
files = [];
|
files = [];
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
/**
|
/**
|
||||||
* Override the default behavior of validating uploaded files
|
* Override the default behavior of validating uploaded files
|
||||||
* The default behavior does not validate files
|
* The default behavior does not validate files
|
||||||
* @type {(files: Files) => Files} [validateFiles = (files: Files) => Files;]
|
* @type {(files: Files) => Files} [validateFiles = (files: Files) => Files]
|
||||||
*/
|
*/
|
||||||
export let validateFiles = (files) => files;
|
export let validateFiles = (files) => files;
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {boolean | number} ColumnSize
|
* @typedef {boolean | number} ColumnSize
|
||||||
* @typedef {{span?: ColumnSize: offset: number;}} ColumnSizeDescriptor
|
* @typedef {{span?: ColumnSize; offset: number;}} ColumnSizeDescriptor
|
||||||
* @typedef {ColumnSize | ColumnSizeDescriptor} ColumnBreakpoint
|
* @typedef {ColumnSize | ColumnSizeDescriptor} ColumnBreakpoint
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default translation ids
|
* Override the default translation ids
|
||||||
* @type {(id: ListBoxFieldTranslationId) => string;} [translateWithId = (id) => string;]
|
* @type {(id: ListBoxFieldTranslationId) => string} [translateWithId = (id) => string]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = (id) => defaultTranslations[id];
|
export let translateWithId = (id) => defaultTranslations[id];
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default translation ids
|
* Override the default translation ids
|
||||||
* @type {(id: ListBoxMenuIconTranslationId) => string;} [translateWithId = (id) => string;]
|
* @type {(id: ListBoxMenuIconTranslationId) => string} [translateWithId = (id) => string]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = (id) => defaultTranslations[id];
|
export let translateWithId = (id) => defaultTranslations[id];
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* Specify the number of selected items
|
* Specify the number of selected items
|
||||||
* @type {*} [selectionCount]
|
* @type {any} [selectionCount]
|
||||||
*/
|
*/
|
||||||
export let selectionCount = undefined;
|
export let selectionCount = undefined;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default translation ids
|
* Override the default translation ids
|
||||||
* @type {(id: ListBoxSelectionTranslationId) => string;} [translateWithId = (id) => string;]
|
* @type {(id: ListBoxSelectionTranslationId) => string} [translateWithId = (id) => string]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = (id) => defaultTranslations[id];
|
export let translateWithId = (id) => defaultTranslations[id];
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the display of a multiselect item
|
* Override the display of a multiselect item
|
||||||
* @type {(item: MultiSelectItem) => string;} [itemToString = (item: MultiSelectItem) => MultiSelectItemText | MultiSelectItemId;]
|
* @type {(item: MultiSelectItem) => string} [itemToString = (item: MultiSelectItem) => MultiSelectItemText | MultiSelectItemId]
|
||||||
*/
|
*/
|
||||||
export let itemToString = (item) => item.text || item.id;
|
export let itemToString = (item) => item.text || item.id;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
/**
|
/**
|
||||||
* Override the filtering logic
|
* Override the filtering logic
|
||||||
* The default filtering is an exact string comparison
|
* The default filtering is an exact string comparison
|
||||||
* @type {(item: MultiSelectItem, value: string) => string;} [filterItem = ((item: MultiSelectItem, value: string) => string;)]
|
* @type {(item: MultiSelectItem, value: string) => string} [filterItem = (item: MultiSelectItem, value: string) => string]
|
||||||
*/
|
*/
|
||||||
export let filterItem = (item, value) =>
|
export let filterItem = (item, value) =>
|
||||||
item.text.toLowerCase().includes(value.toLowerCase());
|
item.text.toLowerCase().includes(value.toLowerCase());
|
||||||
|
@ -94,14 +94,14 @@
|
||||||
/**
|
/**
|
||||||
* Override the sorting logic
|
* Override the sorting logic
|
||||||
* The default sorting compare the item text value
|
* The default sorting compare the item text value
|
||||||
* @type {(a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem;} [sortItem = (a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem]
|
* @type {(a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem} [sortItem = (a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem]
|
||||||
*/
|
*/
|
||||||
export let sortItem = (a, b) =>
|
export let sortItem = (a, b) =>
|
||||||
a.text.localeCompare(b.text, locale, { numeric: true });
|
a.text.localeCompare(b.text, locale, { numeric: true });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default translation ids
|
* Override the default translation ids
|
||||||
* @type {(id: any) => string;} [translateWithId]
|
* @type {(id: any) => string} [translateWithId]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = undefined;
|
export let translateWithId = undefined;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the size of the input
|
* Set the size of the input
|
||||||
* @type {"sm" | "xl"} [size]
|
* @type {"sm" | "xl"} [size]
|
||||||
|
@ -100,10 +98,10 @@
|
||||||
/**
|
/**
|
||||||
* @typedef {"increment" | "decrement"} NumberInputTranslationId
|
* @typedef {"increment" | "decrement"} NumberInputTranslationId
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the default translation ids
|
* Override the default translation ids
|
||||||
* @type {(id: NumberInputTranslationId) => string;} [translateWithId = (id: NumberInputTranslationId) => string;]
|
* @type {(id: NumberInputTranslationId) => string} [translateWithId = (id: NumberInputTranslationId) => string]
|
||||||
*/
|
*/
|
||||||
export let translateWithId = (id) => defaultTranslations[id];
|
export let translateWithId = (id) => defaultTranslations[id];
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,13 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the item text
|
* Override the item text
|
||||||
* @type {(min: number, max: number) => string;} [itemText = (min: number, max: number) => string;]
|
* @type {(min: number, max: number) => string} [itemText = (min: number, max: number) => string]
|
||||||
*/
|
*/
|
||||||
export let itemText = (min, max) => `${min}–${max} items`;
|
export let itemText = (min, max) => `${min}–${max} items`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the item range text
|
* Override the item range text
|
||||||
* @type {(min: number, max: number, total: number) => string;} [itemRangeText = (min: number, max: number, total: number) => string;]
|
* @type {(min: number, max: number, total: number) => string} [itemRangeText = (min: number, max: number, total: number) => string]
|
||||||
*/
|
*/
|
||||||
export let itemRangeText = (min, max, total) =>
|
export let itemRangeText = (min, max, total) =>
|
||||||
`${min}–${max} of ${total} items`;
|
`${min}–${max} of ${total} items`;
|
||||||
|
@ -74,13 +74,13 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the page text
|
* Override the page text
|
||||||
* @type {(page: number) => string;} [pageText = (current: number) => string;]
|
* @type {(page: number) => string} [pageText = (current: number) => string]
|
||||||
*/
|
*/
|
||||||
export let pageText = (page) => `page ${page}`;
|
export let pageText = (page) => `page ${page}`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the page range text
|
* Override the page range text
|
||||||
* @type {(current: number, total: number) => string;} [pageRangeText = (current: number, total: number) => string;]
|
* @type {(current: number, total: number) => string} [pageRangeText = (current: number, total: number) => string]
|
||||||
*/
|
*/
|
||||||
export let pageRangeText = (current, total) => `of ${total} pages`;
|
export let pageRangeText = (current, total) => `of ${total} pages`;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue