From 8d30c0be97e6d205bba14764217441ce1234b95d Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 11 Dec 2019 08:21:20 +0100 Subject: [PATCH] MOBILE-3213 core: Run script that removes types from JSDoc --- .../block/myoverview/components/myoverview/myoverview.ts | 2 +- src/addon/calendar/pages/list/list.ts | 2 -- src/addon/mod/data/fields/latlong/component/latlong.ts | 2 +- src/addon/mod/forum/providers/forum.ts | 2 +- src/classes/site.ts | 2 +- src/core/course/providers/helper.ts | 2 +- src/core/filter/providers/default-filter.ts | 2 +- src/core/filter/providers/delegate.ts | 2 +- src/core/h5p/classes/content-validator.ts | 4 ++-- src/core/h5p/providers/pluginfile-handler.ts | 2 +- src/providers/app.ts | 2 +- src/providers/plugin-file-delegate.ts | 2 +- src/providers/utils/text.ts | 6 +++--- 13 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/addon/block/myoverview/components/myoverview/myoverview.ts b/src/addon/block/myoverview/components/myoverview/myoverview.ts index 26c82500a..b6f062542 100644 --- a/src/addon/block/myoverview/components/myoverview/myoverview.ts +++ b/src/addon/block/myoverview/components/myoverview/myoverview.ts @@ -327,7 +327,7 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem /** * Set selected courses filter. * - * @param {string} filter Filter name to set. + * @param filter Filter name to set. */ protected setCourseFilter(filter: string): void { this.selectedFilter = filter; diff --git a/src/addon/calendar/pages/list/list.ts b/src/addon/calendar/pages/list/list.ts index a9857a2cf..250c9054b 100644 --- a/src/addon/calendar/pages/list/list.ts +++ b/src/addon/calendar/pages/list/list.ts @@ -437,8 +437,6 @@ export class AddonCalendarListPage implements OnDestroy { }); } - /** - */ protected filterEvents(): void { this.filteredEvents = this.calendarHelper.getFilteredEvents(this.events, this.filter, this.categories); } diff --git a/src/addon/mod/data/fields/latlong/component/latlong.ts b/src/addon/mod/data/fields/latlong/component/latlong.ts index 767487e9d..2e154961e 100644 --- a/src/addon/mod/data/fields/latlong/component/latlong.ts +++ b/src/addon/mod/data/fields/latlong/component/latlong.ts @@ -101,7 +101,7 @@ export class AddonModDataFieldLatlongComponent extends AddonModDataFieldPluginCo /** * Get user location. * - * @param {Event} $event The event. + * @param $event The event. */ getLocation(event: Event): void { event.preventDefault(); diff --git a/src/addon/mod/forum/providers/forum.ts b/src/addon/mod/forum/providers/forum.ts index 2b354bfb8..a852c2aec 100644 --- a/src/addon/mod/forum/providers/forum.ts +++ b/src/addon/mod/forum/providers/forum.ts @@ -600,7 +600,7 @@ export class AddonModForumProvider { * @param siteId Site ID. If not defined, current site. * @return Promise resolved with an object with: * - discussions: List of discussions. Note that for every discussion in the list discussion.id is the main post ID but - * discussion ID is discussion.discussion. + * discussion ID is discussion.discussion. * - canLoadMore: True if there may be more discussions to load. */ getDiscussions(forumId: number, sortOrder?: number, page: number = 0, forceCache?: boolean, siteId?: string): Promise { diff --git a/src/classes/site.ts b/src/classes/site.ts index 574f6be44..5d738185b 100644 --- a/src/classes/site.ts +++ b/src/classes/site.ts @@ -1903,7 +1903,7 @@ export class CoreSite { * Get a certain cache expiration delay. * * @param updateFrequency The update frequency of the entry. - * @return {number} Expiration delay. + * @return Expiration delay. */ getExpirationDelay(updateFrequency?: number): number { let expirationDelay = this.UPDATE_FREQUENCIES[updateFrequency] || this.UPDATE_FREQUENCIES[CoreSite.FREQUENCY_USUALLY]; diff --git a/src/core/course/providers/helper.ts b/src/core/course/providers/helper.ts index 0501ba682..ffbc281b5 100644 --- a/src/core/course/providers/helper.ts +++ b/src/core/course/providers/helper.ts @@ -1127,7 +1127,7 @@ export class CoreCourseHelperProvider { * @param courseId Course ID. If not defined we'll try to retrieve it from the site. * @param sectionId Section the module belongs to. If not defined we'll try to retrieve it from the site. * @param useModNameToGetModule If true, the app will retrieve all modules of this type with a single WS call. This reduces the - * number of WS calls, but it isn't recommended for modules that can return a lot of contents. + * number of WS calls, but it isn't recommended for modules that can return a lot of contents. * @param modParams Params to pass to the module * @param navCtrl NavController for adding new pages to the current history. Optional for legacy support, but * generates a warning if omitted. diff --git a/src/core/filter/providers/default-filter.ts b/src/core/filter/providers/default-filter.ts index f5f307500..aec2580e1 100644 --- a/src/core/filter/providers/default-filter.ts +++ b/src/core/filter/providers/default-filter.ts @@ -65,7 +65,7 @@ export class CoreFilterDefaultHandler implements CoreFilterHandler { /** * Whether or not the handler is enabled on a site level. * - * @return {boolean|Promise} Whether or not the handler is enabled on a site level. + * @return Whether or not the handler is enabled on a site level. */ isEnabled(): boolean | Promise { return true; diff --git a/src/core/filter/providers/delegate.ts b/src/core/filter/providers/delegate.ts index 642a454ca..fef46c423 100644 --- a/src/core/filter/providers/delegate.ts +++ b/src/core/filter/providers/delegate.ts @@ -236,7 +236,7 @@ export class CoreFilterDelegate extends CoreDelegate { * @param filter Filter to check. * @param options Options passed to the filters. * @param site Site. If not defined, current site. - * @return {Promise} Promise resolved with true: whether the filter should be applied. + * @return Promise resolved with true: whether the filter should be applied. */ shouldBeApplied(filters: CoreFilterFilter[], options: CoreFilterFormatTextOptions, site?: CoreSite): Promise { // Wait for filters to be initialized. diff --git a/src/core/h5p/classes/content-validator.ts b/src/core/h5p/classes/content-validator.ts index 18ae59dc3..3d4baac9f 100644 --- a/src/core/h5p/classes/content-validator.ts +++ b/src/core/h5p/classes/content-validator.ts @@ -681,8 +681,8 @@ export class CoreH5PContentValidator { * Processes an HTML tag. * * @param m An array with various meaning depending on the value of store. - * If store is TRUE then the array contains the allowed tags. - * If store is FALSE then the array has one element, the HTML tag to process. + * If store is TRUE then the array contains the allowed tags. + * If store is FALSE then the array has one element, the HTML tag to process. * @param store Whether to store m. * @return string If the element isn't allowed, an empty string. Otherwise, the cleaned up version of the HTML element. */ diff --git a/src/core/h5p/providers/pluginfile-handler.ts b/src/core/h5p/providers/pluginfile-handler.ts index 13657fc2d..3a38e6381 100644 --- a/src/core/h5p/providers/pluginfile-handler.ts +++ b/src/core/h5p/providers/pluginfile-handler.ts @@ -66,7 +66,7 @@ export class CoreH5PPluginFileHandler implements CorePluginFileHandler { * CoreFilepoolProvider.extractDownloadableFilesFromHtml. * * @param container Container where to get the URLs from. - * @return {string[]} List of URLs. + * @return List of URLs. */ getDownloadableFilesFromHTML(container: HTMLElement): string[] { const iframes = Array.from(container.querySelectorAll('iframe.h5p-iframe')); diff --git a/src/providers/app.ts b/src/providers/app.ts index 7aa6a6a70..f2071b076 100644 --- a/src/providers/app.ts +++ b/src/providers/app.ts @@ -164,7 +164,7 @@ export class CoreAppProvider { /** * Returns whether the user agent is controlled by automation. I.e. Behat testing. * - * @return {boolean} True if the user agent is controlled by automation, false otherwise. + * @return True if the user agent is controlled by automation, false otherwise. */ static isAutomated(): boolean { return !!navigator.webdriver; diff --git a/src/providers/plugin-file-delegate.ts b/src/providers/plugin-file-delegate.ts index 17354d4b5..469518698 100644 --- a/src/providers/plugin-file-delegate.ts +++ b/src/providers/plugin-file-delegate.ts @@ -71,7 +71,7 @@ export interface CorePluginFileHandler extends CoreDelegateHandler { * CoreFilepoolProvider.extractDownloadableFilesFromHtml. * * @param container Container where to get the URLs from. - * @return {string[]} List of URLs. + * @return List of URLs. */ getDownloadableFilesFromHTML?(container: HTMLElement): string[]; diff --git a/src/providers/utils/text.ts b/src/providers/utils/text.ts index 0a858127e..d4826c942 100644 --- a/src/providers/utils/text.ts +++ b/src/providers/utils/text.ts @@ -78,8 +78,8 @@ export class CoreTextUtilsProvider { /** * Add ending slash from a path or URL. * - * @param {string} text Text to treat. - * @return {string} Treated text. + * @param text Text to treat. + * @return Treated text. */ addEndingSlash(text: string): string { if (!text) { @@ -742,7 +742,7 @@ export class CoreTextUtilsProvider { * @param replace The value to put inside the string. * @param start The index where to start putting the new string. If negative, it will count from the end of the string. * @param length Length of the portion of string which is to be replaced. If negative, it represents the number of characters - * from the end of string at which to stop replacing. If not provided, replace until the end of the string. + * from the end of string at which to stop replacing. If not provided, replace until the end of the string. * @return Treated string. */ substrReplace(str: string, replace: string, start: number, length?: number): string {