chore: remove trailing semicolono from jsdoc types

This commit is contained in:
Eric Liu 2020-07-27 06:23:31 -07:00
commit a10693659e
12 changed files with 22 additions and 24 deletions

View file

@ -11,7 +11,7 @@
/**
* 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;
@ -89,7 +89,7 @@
/**
* Override the default translation ids
* @type {(id: any) => string;} [translateWithId]
* @type {(id: any) => string} [translateWithId]
*/
export let translateWithId = undefined;

View file

@ -7,7 +7,7 @@
/**
* Override the default id translations
* @type {() => string;} [translateWithId = () => "";]
* @type {() => string} [translateWithId = () => ""]
*/
export let translateWithId = () => "";

View file

@ -13,7 +13,7 @@
/**
* 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;
@ -91,7 +91,7 @@
/**
* Override the default translation ids
* @type {(id: any) => string;} [translateWithId]
* @type {(id: any) => string} [translateWithId]
*/
export let translateWithId = undefined;

View file

@ -25,7 +25,7 @@
/**
* Override the default behavior of clearing the array of uploaded files
* @type {() => any;} [clearFiles = () => void;]
* @type {() => any} [clearFiles = () => void]
*/
export const clearFiles = () => {
files = [];

View file

@ -18,7 +18,7 @@
/**
* Override the default behavior of validating uploaded 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;

View file

@ -32,7 +32,7 @@
/**
* @typedef {boolean | number} ColumnSize
* @typedef {{span?: ColumnSize: offset: number;}} ColumnSizeDescriptor
* @typedef {{span?: ColumnSize; offset: number;}} ColumnSizeDescriptor
* @typedef {ColumnSize | ColumnSizeDescriptor} ColumnBreakpoint
*/

View file

@ -30,7 +30,7 @@
/**
* 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];

View file

@ -18,7 +18,7 @@
/**
* 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];

View file

@ -1,7 +1,7 @@
<script>
/**
* Specify the number of selected items
* @type {*} [selectionCount]
* @type {any} [selectionCount]
*/
export let selectionCount = undefined;
@ -27,7 +27,7 @@
/**
* 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];

View file

@ -13,7 +13,7 @@
/**
* 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;
@ -62,7 +62,7 @@
/**
* Override the filtering logic
* 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) =>
item.text.toLowerCase().includes(value.toLowerCase());
@ -94,14 +94,14 @@
/**
* Override the sorting logic
* 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) =>
a.text.localeCompare(b.text, locale, { numeric: true });
/**
* Override the default translation ids
* @type {(id: any) => string;} [translateWithId]
* @type {(id: any) => string} [translateWithId]
*/
export let translateWithId = undefined;

View file

@ -1,6 +1,4 @@
<script>
/**
* Set the size of the input
* @type {"sm" | "xl"} [size]
@ -100,10 +98,10 @@
/**
* @typedef {"increment" | "decrement"} NumberInputTranslationId
*/
/**
* 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];

View file

@ -37,13 +37,13 @@
/**
* 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`;
/**
* 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) =>
`${min}${max} of ${total} items`;
@ -74,13 +74,13 @@
/**
* 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}`;
/**
* 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`;