diff --git a/src/addons/badges/services/badges.ts b/src/addons/badges/services/badges.ts index 8ab031010..939f18552 100644 --- a/src/addons/badges/services/badges.ts +++ b/src/addons/badges/services/badges.ts @@ -194,7 +194,7 @@ export type AddonBadgesUserBadge = { targetframework?: string; // Target framework. targetcode?: string; // Target code. }[]; - competencies?: { // @deprecatedonmoodle from 3.7. @since 3.6. In 3.7 it was renamed to alignment. + competencies?: { // @deprecatedonmoodle since 3.7. @since 3.6. In 3.7 it was renamed to alignment. id?: number; // Alignment id. badgeid?: number; // Badge id. targetname?: string; // Target name. diff --git a/src/addons/calendar/pages/edit-event/edit-event.ts b/src/addons/calendar/pages/edit-event/edit-event.ts index eb1bca439..a6dd52dd0 100644 --- a/src/addons/calendar/pages/edit-event/edit-event.ts +++ b/src/addons/calendar/pages/edit-event/edit-event.ts @@ -646,7 +646,7 @@ export class AddonCalendarEditEventPage implements OnInit, OnDestroy, CanLeave { */ async addReminder(): Promise { const formData = this.form.value; - const eventTime = CoreTimeUtils.convertToTimestamp(formData.timestart, true); + const eventTime = moment(formData.timestart).unix(); const reminderTime = await CoreDomUtils.openPopover<{timeBefore: number}>({ component: CoreRemindersSetReminderMenuComponent, diff --git a/src/addons/messages/services/messages.ts b/src/addons/messages/services/messages.ts index 5fbe30c06..b4a6e6cc6 100644 --- a/src/addons/messages/services/messages.ts +++ b/src/addons/messages/services/messages.ts @@ -97,7 +97,7 @@ export class AddonMessagesProvider { * @param userId User ID of the person to add. * @param siteId Site ID. If not defined, use current site. * @returns Resolved when done. - * @deprecated since Moodle 3.6 + * @deprecatedonmoodle since 3.6 */ protected async addContact(userId: number, siteId?: string): Promise { const site = await CoreSites.getSite(siteId); @@ -582,7 +582,7 @@ export class AddonMessagesProvider { * * @param siteId Site ID. If not defined, use current site. * @returns Promise resolved with the WS data. - * @deprecated since Moodle 3.6 + * @deprecatedonmoodle since 3.6 */ async getAllContacts(siteId?: string): Promise { siteId = siteId || CoreSites.getCurrentSiteId(); @@ -634,7 +634,7 @@ export class AddonMessagesProvider { * * @param siteId Site ID. If not defined, use current site. * @returns Promise resolved with the WS data. - * @deprecated since Moodle 3.6 + * @deprecatedonmoodle since 3.6 */ async getContacts(siteId?: string): Promise { const site = await CoreSites.getSite(siteId); @@ -2120,7 +2120,7 @@ export class AddonMessagesProvider { * * @param userIdFrom User Id for the sender. * @returns Promise resolved with boolean marking success or not. - * @deprecated since Moodle 3.6 + * @deprecatedonmoodle since 3.6 */ async markAllMessagesRead(userIdFrom?: number): Promise { const params: AddonMessagesMarkAllMessagesAsReadWSParams = { @@ -3049,12 +3049,14 @@ export type AddonMessagesMessagePreferencesNotificationProcessor = { lockedmessage?: string; // @since 3.6. Text to display if locked. userconfigured: number; // Is configured?. enabled?: boolean; // @since 4.0. Processor enabled. - loggedin: AddonNotificationsPreferencesNotificationProcessorState; // @deprecated removed on 4.0. - loggedoff: AddonNotificationsPreferencesNotificationProcessorState; // @deprecated removed on 4.0. + loggedin: AddonNotificationsPreferencesNotificationProcessorState; // @deprecatedonmoodle since 4.0. + loggedoff: AddonNotificationsPreferencesNotificationProcessorState; // @deprecatedonmoodle since 4.0. }; /** * Message discussion (before 3.6). + * + * @deprecatedonmoodle since 3.6. */ export type AddonMessagesDiscussion = { fullname: string; // Full name of the other user in the discussion. diff --git a/src/addons/notifications/pages/settings/settings.ts b/src/addons/notifications/pages/settings/settings.ts index f0c7a5d56..17a87fe72 100644 --- a/src/addons/notifications/pages/settings/settings.ts +++ b/src/addons/notifications/pages/settings/settings.ts @@ -332,7 +332,7 @@ export class AddonNotificationsSettingsPage implements OnInit, OnDestroy { } /** - * Page destroyed. + * @inheritdoc */ ngOnDestroy(): void { // If there is a pending action to update preferences, execute it right now. @@ -347,7 +347,7 @@ export class AddonNotificationsSettingsPage implements OnInit, OnDestroy { /** * State in notification processor in notification preferences component with some calculated data. * - * @deprecated 4.0 + * @deprecatedonmoodle since 4.0 */ type ProcessorStateFormatted = AddonNotificationsPreferencesNotificationProcessorState & { updating?: boolean; // Calculated in the app. Whether the state is being updated. diff --git a/src/addons/notifications/services/notifications.ts b/src/addons/notifications/services/notifications.ts index 83ddd8b4d..268551e63 100644 --- a/src/addons/notifications/services/notifications.ts +++ b/src/addons/notifications/services/notifications.ts @@ -496,14 +496,14 @@ export type AddonNotificationsPreferencesNotificationProcessor = { lockedmessage?: string; // @since 3.6. Text to display if locked. userconfigured: number; // Is configured?. enabled?: boolean; // @since 4.0. Processor enabled. - loggedin: AddonNotificationsPreferencesNotificationProcessorState; // @deprecated removed on 4.0. - loggedoff: AddonNotificationsPreferencesNotificationProcessorState; // @deprecated removed on 4.0. + loggedin: AddonNotificationsPreferencesNotificationProcessorState; // @deprecatedonmoodle since 4.0. + loggedoff: AddonNotificationsPreferencesNotificationProcessorState; // @deprecatedonmoodle since 4.0. }; /** * State in notification processor in notification preferences component. * - * @deprecated removed on 4.0. + * @deprecatedonmoodle since 4.0 */ export type AddonNotificationsPreferencesNotificationProcessorState = { name: 'loggedoff' | 'loggedin'; // Name. diff --git a/src/core/classes/element-controllers/FrameElementController.ts b/src/core/classes/element-controllers/FrameElementController.ts index e449de41b..51fbf60b2 100644 --- a/src/core/classes/element-controllers/FrameElementController.ts +++ b/src/core/classes/element-controllers/FrameElementController.ts @@ -14,6 +14,11 @@ import { ElementController } from './ElementController'; +/** + * Possible types of frame elements. + * + * @todo Remove frame TAG support. + */ export type FrameElement = HTMLIFrameElement | HTMLFrameElement | HTMLObjectElement | HTMLEmbedElement; /** diff --git a/src/core/classes/errors/ajaxerror.ts b/src/core/classes/errors/ajaxerror.ts index 9761403c9..a88c31d22 100644 --- a/src/core/classes/errors/ajaxerror.ts +++ b/src/core/classes/errors/ajaxerror.ts @@ -19,7 +19,10 @@ import { CoreSiteError, CoreSiteErrorOptions } from '@classes/errors/siteerror'; */ export class CoreAjaxError extends CoreSiteError { - available = 1; // @deprecated since app 4.0. AJAX endpoint should always be available in supported Moodle versions. + /** + * @deprecated since 4.0. AJAX endpoint should always be available in supported Moodle versions. + */ + available = 1; status?: number; constructor(messageOrOptions: string | CoreSiteErrorOptions, available?: number, status?: number) { diff --git a/src/core/classes/promised-value.ts b/src/core/classes/promised-value.ts index 43896f16c..24f173224 100644 --- a/src/core/classes/promised-value.ts +++ b/src/core/classes/promised-value.ts @@ -57,7 +57,7 @@ export class CorePromisedValue extends CorePromise { /** * @returns Promise. - * @deprecated since app 4.1. The instance can be directly used as a promise. + * @deprecated since 4.1. The instance can be directly used as a promise. */ get promise(): Promise { return this; diff --git a/src/core/classes/site.ts b/src/core/classes/site.ts index 5fd82416f..0a7715b2c 100644 --- a/src/core/classes/site.ts +++ b/src/core/classes/site.ts @@ -1607,8 +1607,9 @@ export class CoreSite { * Check if the local_mobile plugin is installed in the Moodle site. * * @returns Promise resolved when the check is done. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ + // eslint-disable-next-line deprecation/deprecation async checkLocalMobilePlugin(): Promise { // Not used anymore. return { code: 0, coreSupported: true }; @@ -1618,7 +1619,7 @@ export class CoreSite { * Check if local_mobile has been installed in Moodle. * * @returns Whether the App is able to use local_mobile plugin for this site. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ checkIfAppUsesLocalMobile(): boolean { return false; @@ -1628,7 +1629,7 @@ export class CoreSite { * Check if local_mobile has been installed in Moodle but the app is not using it. * * @returns Promise resolved it local_mobile was added, rejected otherwise. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async checkIfLocalMobileInstalledAndNotUsed(): Promise { throw new CoreError('Deprecated.'); @@ -2125,7 +2126,7 @@ export class CoreSite { CoreConstants.SECONDS_MINUTE * 6, ); - if (CoreTimeUtils.timestamp() - this.lastAutoLogin < timeBetweenRequests) { + if (CoreTimeUtils.timestamp() - this.lastAutoLogin < Number(timeBetweenRequests)) { // Not enough time has passed since last auto login. return url; } @@ -2626,7 +2627,7 @@ export type CoreSiteWSPreSets = { /** * Response of checking local_mobile status. * - * @deprecated since app 4.0 + * @deprecated since 4.0. */ export type LocalMobileResponse = { /** diff --git a/src/core/components/context-menu/context-menu-item.ts b/src/core/components/context-menu/context-menu-item.ts index f6b0c8900..ecfd5bf17 100644 --- a/src/core/components/context-menu/context-menu-item.ts +++ b/src/core/components/context-menu/context-menu-item.ts @@ -59,9 +59,9 @@ export class CoreContextMenuItemComponent implements OnInit, OnDestroy, OnChange @Output() toggleChange = new EventEmitter();// Will emit an event when toggle changes to enable 2-way data binding. /** - * @deprecated since 4.0. + * @deprecated since 4.0. Not used anymore. */ - @Input() iconDescription?: string; // Name of the icon to be shown on the left side of the item. Not used anymore. + @Input() iconDescription?: string; protected hasAction = false; protected destroyed = false; @@ -93,6 +93,7 @@ export class CoreContextMenuItemComponent implements OnInit, OnDestroy, OnChange this.ctxtMenu.addItem(this); } + // eslint-disable-next-line deprecation/deprecation if (this.iconDescription !== undefined) { CoreLogger.getInstance('CoreContextMenuItemComponent') .warn('iconDescription Input is deprecated and should not be used'); diff --git a/src/core/components/download-refresh/download-refresh.ts b/src/core/components/download-refresh/download-refresh.ts index 7dd013c02..d4e4767cc 100644 --- a/src/core/components/download-refresh/download-refresh.ts +++ b/src/core/components/download-refresh/download-refresh.ts @@ -36,7 +36,7 @@ export class CoreDownloadRefreshComponent { @Input() enabled = false; // Whether the download is enabled. @Input() loading = true; // Force loading status when is not downloading. /** - * @deprecated since 4.0. It has no effect. + * @deprecated since 4.0. Not used anymore. */ @Input() size = ''; // Size of the buttons. @Input() canTrustDownload = false; // If false, refresh will be shown if downloaded. diff --git a/src/core/components/empty-box/empty-box.ts b/src/core/components/empty-box/empty-box.ts index 255ebad47..64d9bf980 100644 --- a/src/core/components/empty-box/empty-box.ts +++ b/src/core/components/empty-box/empty-box.ts @@ -36,7 +36,7 @@ export class CoreEmptyBoxComponent { @Input() flipIconRtl = false; // Whether to flip the icon in RTL. Defaults to false. /** - * @deprecated not used anymore. + * @deprecated since 4.0. Not used anymore. */ @Input() inline = false; diff --git a/src/core/components/loading/loading.ts b/src/core/components/loading/loading.ts index df08396dc..52a40fb7d 100644 --- a/src/core/components/loading/loading.ts +++ b/src/core/components/loading/loading.ts @@ -155,6 +155,7 @@ export class CoreLoadingComponent implements OnInit, OnChanges, AfterViewInit, A } // Event has been deprecated since app 4.0. + // eslint-disable-next-line deprecation/deprecation CoreEvents.trigger(CoreEvents.CORE_LOADING_CHANGED, { loaded, uniqueId: this.uniqueId, diff --git a/src/core/components/mod-icon/mod-icon.ts b/src/core/components/mod-icon/mod-icon.ts index 29bec0fb9..1f4777f9a 100644 --- a/src/core/components/mod-icon/mod-icon.ts +++ b/src/core/components/mod-icon/mod-icon.ts @@ -44,7 +44,7 @@ export class CoreModIconComponent implements OnInit, OnChanges { isLocalUrl = true; linkIconWithComponent = false; - protected legacyIcon = true; // @deprecatedonmoodle since Moodle 3.11. + protected legacyIcon = true; // @deprecatedonmoodle since 3.11. constructor(protected el: ElementRef) { } @@ -122,7 +122,7 @@ export class CoreModIconComponent implements OnInit, OnChanges { let path = assetsPath + 'mod/'; if (this.legacyIcon) { - // @deprecatedonmoodle since Moodle 3.11. + // @deprecatedonmoodle since 3.11. path = assetsPath + 'mod_legacy/'; } diff --git a/src/core/constants.ts b/src/core/constants.ts index fea73ab5d..ed3011d7c 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -78,7 +78,10 @@ export class CoreConstants { // WS constants. static readonly WS_TIMEOUT = 30000; // Timeout when not in WiFi. static readonly WS_TIMEOUT_WIFI = 30000; // Timeout when in WiFi. - static readonly WS_PREFIX = 'local_mobile_'; // @deprecated since app 4.0. + /** + * @deprecated since 4.0. Not used anymore. + */ + static readonly WS_PREFIX = 'local_mobile_'; // Login constants. /** diff --git a/src/core/directives/format-text.ts b/src/core/directives/format-text.ts index 11b47274f..079d03255 100644 --- a/src/core/directives/format-text.ts +++ b/src/core/directives/format-text.ts @@ -52,7 +52,7 @@ import { CoreRefreshContext, CORE_REFRESH_CONTEXT } from '@/core/utils/refresh-c import { CorePlatform } from '@services/platform'; import { ElementController } from '@classes/element-controllers/ElementController'; import { MediaElementController } from '@classes/element-controllers/MediaElementController'; -import { FrameElementController } from '@classes/element-controllers/FrameElementController'; +import { FrameElement, FrameElementController } from '@classes/element-controllers/FrameElementController'; import { CoreUrl } from '@singletons/url'; import { CoreIcons } from '@singletons/icons'; @@ -90,12 +90,20 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec @Input() hideIfEmpty = false; // If true, the tag will contain nothing if text is empty. @Input() disabled?: boolean; // If disabled, autoplay elements will be disabled. - @Input() fullOnClick?: boolean | string; // @deprecated on 4.0 Won't do anything. - @Input() fullTitle?: string; // @deprecated on 4.0 Won't do anything. + /** + * @deprecated since 4.0. Not used anymore. + */ + @Input() fullOnClick?: boolean | string; + /** + * @deprecated since 4.0. Not used anymore. + */ + @Input() fullTitle?: string; /** * Max height in pixels to render the content box. It should be 50 at least to make sense. + * + * @deprecated since 4.0 Use collapsible-item directive instead. */ - @Input() maxHeight?: number; // @deprecated on 4.0 Use collapsible-item directive instead. + @Input() maxHeight?: number; @Output() afterRender: EventEmitter; // Called when the data is rendered. @Output() onClick: EventEmitter = new EventEmitter(); // Called when clicked. @@ -373,8 +381,10 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec await CoreUtils.nextTick(); // Use collapsible-item directive instead. + // eslint-disable-next-line deprecation/deprecation if (this.maxHeight && !this.collapsible) { this.collapsible = new CoreCollapsibleItemDirective(new ElementRef(this.element)); + // eslint-disable-next-line deprecation/deprecation this.collapsible.height = this.maxHeight; this.collapsible.ngOnInit(); } @@ -574,7 +584,7 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec }); // Handle all kind of frames. - const frameControllers = frames.map((frame: HTMLFrameElement | HTMLObjectElement | HTMLEmbedElement) => { + const frameControllers = frames.map((frame: FrameElement) => { CoreIframeUtils.treatFrame(frame, false); return new FrameElementController(frame, !this.disabled); diff --git a/src/core/features/compile/services/compile.ts b/src/core/features/compile/services/compile.ts index fb6559559..f79aff978 100644 --- a/src/core/features/compile/services/compile.ts +++ b/src/core/features/compile/services/compile.ts @@ -353,10 +353,11 @@ export class CoreCompileProvider { instance['CoreLoggerProvider'] = CoreLogger; instance['moment'] = moment; instance['Md5'] = Md5; - instance['Network'] = CoreNetwork.instance; // @deprecated on 4.1, plugins should use CoreNetwork instead. - instance['Platform'] = CorePlatform.instance; // @deprecated on 4.1, plugins should use CorePlatform instead. + instance['Network'] = CoreNetwork.instance; // @deprecated since 4.1, plugins should use CoreNetwork instead. + instance['Platform'] = CorePlatform.instance; // @deprecated since 4.1, plugins should use CorePlatform instead. instance['CoreSyncBaseProvider'] = CoreSyncBaseProvider; instance['CoreArray'] = CoreArray; + // eslint-disable-next-line deprecation/deprecation instance['CoreComponentsRegistry'] = CoreComponentsRegistry; instance['CoreDirectivesRegistry'] = CoreDirectivesRegistry; instance['CoreNetwork'] = CoreNetwork.instance; diff --git a/src/core/features/contentlinks/classes/module-index-handler.ts b/src/core/features/contentlinks/classes/module-index-handler.ts index 5ec69b4e1..c9a0892ad 100644 --- a/src/core/features/contentlinks/classes/module-index-handler.ts +++ b/src/core/features/contentlinks/classes/module-index-handler.ts @@ -59,7 +59,7 @@ export class CoreContentLinksModuleIndexHandler extends CoreContentLinksHandlerB * @param params The params of the URL. E.g. 'mysite.com?id=1' -> {id: 1} * @param courseId Course ID related to the URL. Optional but recommended. * @returns List of params to pass to navigateToModule / navigateToModuleByInstance. - * @deprecated since 4.0 + * @deprecated since 4.0. Not used anymore. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars getPageParams(url: string, params: Record, courseId?: number): Params { @@ -101,6 +101,7 @@ export class CoreContentLinksModuleIndexHandler extends CoreContentLinksHandlerB let modNavOptions = this.getModNavOptions(url, params, siteId, courseId); if (!modNavOptions) { // Use the old function, currently deprecated. + // eslint-disable-next-line deprecation/deprecation const pageParams = this.getPageParams(url, params, courseId); if (pageParams && Object.keys(pageParams).length > 0) { modNavOptions = { params: pageParams }; diff --git a/src/core/features/course/components/components.module.ts b/src/core/features/course/components/components.module.ts index 598626b03..b94aeef38 100644 --- a/src/core/features/course/components/components.module.ts +++ b/src/core/features/course/components/components.module.ts @@ -38,8 +38,10 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion- CoreCourseModuleComponent, CoreCourseModuleCompletionComponent, CoreCourseModuleCompletionLegacyComponent, + // eslint-disable-next-line deprecation/deprecation CoreCourseModuleDescriptionComponent, CoreCourseModuleInfoComponent, + // eslint-disable-next-line deprecation/deprecation CoreCourseModuleManualCompletionComponent, CoreCourseCourseIndexComponent, CoreCourseCourseIndexTourComponent, @@ -59,8 +61,10 @@ import { CoreCourseModuleCompletionDetailsComponent } from './module-completion- CoreCourseModuleComponent, CoreCourseModuleCompletionComponent, CoreCourseModuleCompletionLegacyComponent, + // eslint-disable-next-line deprecation/deprecation CoreCourseModuleDescriptionComponent, CoreCourseModuleInfoComponent, + // eslint-disable-next-line deprecation/deprecation CoreCourseModuleManualCompletionComponent, CoreCourseCourseIndexComponent, CoreCourseCourseIndexTourComponent, diff --git a/src/core/features/course/components/module/module.ts b/src/core/features/course/components/module/module.ts index 649f4f1b7..8fdce6b4d 100644 --- a/src/core/features/course/components/module/module.ts +++ b/src/core/features/course/components/module/module.ts @@ -199,6 +199,7 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { * @param event Click event. */ buttonClicked(event: Event): void { + // eslint-disable-next-line deprecation/deprecation const button = this.module.handlerData?.button ?? this.module.handlerData?.buttons?.[0]; if (!button || !button.action) { return; diff --git a/src/core/features/course/pages/course-summary/course-summary.page.ts b/src/core/features/course/pages/course-summary/course-summary.page.ts index dbe4d467c..b43a91a6f 100644 --- a/src/core/features/course/pages/course-summary/course-summary.page.ts +++ b/src/core/features/course/pages/course-summary/course-summary.page.ts @@ -41,7 +41,7 @@ import { CoreTime } from '@singletons/time'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreEnrolHelper } from '@features/enrol/services/enrol-helper'; import { CoreEnrolDelegate } from '@features/enrol/services/enrol-delegate'; -import { CoreEnrolEnrolmentMethod } from '@features/enrol/services/enrol'; +import { CoreEnrol, CoreEnrolEnrolmentMethod } from '@features/enrol/services/enrol'; /** * Page that shows the summary of a course including buttons to enrol and other available options. @@ -407,8 +407,7 @@ export class CoreCourseSummaryPage implements OnInit, OnDestroy { promises.push(CoreCourses.invalidateCourse(this.courseId)); promises.push(CoreCourseOptionsDelegate.clearAndInvalidateCoursesOptions(this.courseId)); promises.push(CoreCourses.invalidateCoursesByField('id', this.courseId)); - - promises.push(CoreCourses.invalidateCourseEnrolmentMethods(this.courseId)); + promises.push(CoreEnrol.invalidateCourseEnrolmentMethods(this.courseId)); this.selfEnrolInstances.forEach((method) => { promises.push(CoreEnrolDelegate.invalidate(method)); diff --git a/src/core/features/course/services/course-helper.ts b/src/core/features/course/services/course-helper.ts index 7cefea8cc..02a950bdc 100644 --- a/src/core/features/course/services/course-helper.ts +++ b/src/core/features/course/services/course-helper.ts @@ -261,8 +261,8 @@ export class CoreCourseHelperProvider { /** * Calculate completion data of a module. * - * @deprecated since 4.0. * @param module Module. + * @deprecated since 4.0. */ calculateModuleCompletionData(module: CoreCourseModuleData): void { if (!module.completiondata || !module.completion) { @@ -312,6 +312,7 @@ export class CoreCourseHelperProvider { } sectionWithStatus.downloadStatus = result.status; + // eslint-disable-next-line deprecation/deprecation sectionWithStatus.canCheckUpdates = true; // Set this section data. @@ -374,6 +375,7 @@ export class CoreCourseHelperProvider { if (allSectionsSection) { // Set "All sections" data. allSectionsSection.downloadStatus = allSectionsStatus; + // eslint-disable-next-line deprecation/deprecation allSectionsSection.canCheckUpdates = true; allSectionsSection.isDownloading = allSectionsStatus === CoreConstants.DOWNLOADING; } @@ -518,7 +520,7 @@ export class CoreCourseHelperProvider { * @param module Module to remove the files. * @param courseId Course ID the module belongs to. * @returns Promise resolved when done. - * @deprecated since 4.0 + * @deprecated since 4.0. */ async confirmAndRemoveFiles(module: CoreCourseModuleData, courseId: number): Promise { let modal: CoreIonLoadingElement | undefined; @@ -646,6 +648,7 @@ export class CoreCourseHelperProvider { } }); + // eslint-disable-next-line deprecation/deprecation accessData.passwordRequired = accessData.requiresUserInput; // For backwards compatibility. return accessData; @@ -1358,11 +1361,11 @@ export class CoreCourseHelperProvider { /** * Get the course ID from a module instance ID, showing an error message if it can't be retrieved. * - * @deprecated since 4.0. * @param instanceId Instance ID. * @param moduleName Name of the module. E.g. 'glossary'. * @param siteId Site ID. If not defined, current site. * @returns Promise resolved with the module's course ID. + * @deprecated since 4.0. */ async getModuleCourseIdByInstance(instanceId: number, moduleName: string, siteId?: string): Promise { try { @@ -1802,6 +1805,7 @@ export class CoreCourseHelperProvider { // Set "All sections" data. section.downloadStatus = allSectionsStatus; + // eslint-disable-next-line deprecation/deprecation section.canCheckUpdates = true; section.isDownloading = allSectionsStatus === CoreConstants.DOWNLOADING; } finally { @@ -2116,7 +2120,10 @@ export type CoreCourseSection = CoreCourseWSSection & { */ export type CoreCourseSectionWithStatus = CoreCourseSection & { downloadStatus?: string; // Section status. - canCheckUpdates?: boolean; // Whether can check updates. @deprecated since app 4.0 + /** + * @deprecated since 4.0. + */ + canCheckUpdates?: boolean; // Whether can check updates. isDownloading?: boolean; // Whether section is being downloaded. total?: number; // Total of modules being downloaded. count?: number; // Number of downloaded modules. diff --git a/src/core/features/course/services/course.ts b/src/core/features/course/services/course.ts index 25586200a..23addf433 100644 --- a/src/core/features/course/services/course.ts +++ b/src/core/features/course/services/course.ts @@ -855,7 +855,7 @@ export class CoreCourseProvider { let path = 'assets/img/mod/'; if (!CoreSites.getCurrentSite()?.isVersionGreaterEqualThan('4.0')) { - // @deprecatedonmoodle since Moodle 3.11. + // @deprecatedonmoodle since 3.11. path = 'assets/img/mod_legacy/'; } @@ -866,10 +866,10 @@ export class CoreCourseProvider { /** * Get the section ID a module belongs to. * - * @deprecated since 4.0. * @param moduleId The module ID. * @param siteId Site ID. If not defined, current site. * @returns Promise resolved with the section ID. + * @deprecated since 4.0. */ async getModuleSectionId(moduleId: number, siteId?: string): Promise { // Try to get the section using getModuleBasicInfo. diff --git a/src/core/features/course/services/format-delegate.ts b/src/core/features/course/services/format-delegate.ts index 5118d550a..bd1a336c2 100644 --- a/src/core/features/course/services/format-delegate.ts +++ b/src/core/features/course/services/format-delegate.ts @@ -60,18 +60,18 @@ export interface CoreCourseFormatHandler extends CoreDelegateHandler { /** * Whether the option to enable section/module download should be displayed. * - * @deprecated on 4.0 Not used anymore because prefetch has been moved to storage manager. * @param course The course to check. * @returns Whether the option to enable section/module download should be displayed. + * @deprecated since 4.0 Not used anymore because prefetch has been moved to storage manager. */ displayEnableDownload?(course: CoreCourseAnyCourseData): boolean; /** * Whether the default course index should be displayed. Defaults to true. * - * @deprecated on 4.0. Please use displayCourseIndex instead. * @param course The course to check. * @returns Whether the default course index should be displayed. + * @deprecated since 4.0. Please use displayCourseIndex instead. */ displaySectionSelector?(course: CoreCourseAnyCourseData): boolean; diff --git a/src/core/features/course/services/handlers/default-module.ts b/src/core/features/course/services/handlers/default-module.ts index 21a4bce08..2d69177e1 100644 --- a/src/core/features/course/services/handlers/default-module.ts +++ b/src/core/features/course/services/handlers/default-module.ts @@ -60,7 +60,7 @@ export class CoreCourseModuleDefaultHandler implements CoreCourseModuleHandler { if ('url' in module && module.url) { const url = module.url; - defaultData.buttons = [{ + defaultData.button = { icon: 'fas-up-right-from-square', label: 'core.openinbrowser', action: (e: Event): void => { @@ -69,7 +69,7 @@ export class CoreCourseModuleDefaultHandler implements CoreCourseModuleHandler { CoreSites.getRequiredCurrentSite().openInBrowserWithAutoLogin(url); }, - }]; + }; } return defaultData; diff --git a/src/core/features/course/services/module-prefetch-delegate.ts b/src/core/features/course/services/module-prefetch-delegate.ts index cb1d2522a..d6acd784e 100644 --- a/src/core/features/course/services/module-prefetch-delegate.ts +++ b/src/core/features/course/services/module-prefetch-delegate.ts @@ -81,7 +81,7 @@ export class CoreCourseModulePrefetchDelegateService extends CoreDelegate { const handler = this.getPrefetchHandlerFor(module.modname); + + // eslint-disable-next-line deprecation/deprecation if (!handler || (onlyToDisplay && handler.skipListStatus)) { return; } @@ -1366,7 +1368,7 @@ export interface CoreCourseModulePrefetchHandler extends CoreDelegateHandler { * If true, this module will be treated as not downloadable when determining the status of a list of modules. The module will * still be downloaded when downloading the section/course, it only affects whether the button should be displayed. * - * @deprecated since app 4.0. + * @deprecated since 4.0. */ skipListStatus?: boolean; diff --git a/src/core/features/courses/components/components.module.ts b/src/core/features/courses/components/components.module.ts index 1b596c8fc..591dc709d 100644 --- a/src/core/features/courses/components/components.module.ts +++ b/src/core/features/courses/components/components.module.ts @@ -22,6 +22,7 @@ import { CoreCoursesCourseOptionsMenuComponent } from './course-options-menu/cou @NgModule({ declarations: [ CoreCoursesCourseListItemComponent, + // eslint-disable-next-line deprecation/deprecation CoreCoursesCourseProgressComponent, CoreCoursesCourseOptionsMenuComponent, ], @@ -30,6 +31,7 @@ import { CoreCoursesCourseOptionsMenuComponent } from './course-options-menu/cou ], exports: [ CoreCoursesCourseListItemComponent, + // eslint-disable-next-line deprecation/deprecation CoreCoursesCourseProgressComponent, CoreCoursesCourseOptionsMenuComponent, ], diff --git a/src/core/features/courses/components/course-progress/course-progress.ts b/src/core/features/courses/components/course-progress/course-progress.ts index d719ab2dc..5d57483d3 100644 --- a/src/core/features/courses/components/course-progress/course-progress.ts +++ b/src/core/features/courses/components/course-progress/course-progress.ts @@ -36,7 +36,7 @@ import { CoreUser } from '@features/user/services/user'; * * * - * @deprecated since 4.0 Use core-courses-course-list-item instead. + * @deprecated since 4.0. Use core-courses-course-list-item instead. */ @Component({ selector: 'core-courses-course-progress', diff --git a/src/core/features/courses/services/courses-helper.ts b/src/core/features/courses/services/courses-helper.ts index d33612e1d..682397e01 100644 --- a/src/core/features/courses/services/courses-helper.ts +++ b/src/core/features/courses/services/courses-helper.ts @@ -211,14 +211,14 @@ export class CoreCoursesHelperProvider { } if (course.courseimage !== undefined) { - course.courseImage = course.courseimage; // @deprecated sinde 4.3 use courseimage instead. + course.courseImage = course.courseimage; // @deprecated since 4.3 use courseimage instead. return; } if (course.overviewfiles && course.overviewfiles[0]) { course.courseimage = course.overviewfiles[0].fileurl; - course.courseImage = course.courseimage; // @deprecated sinde 4.3 use courseimage instead. + course.courseImage = course.courseimage; // @deprecated since 4.3 use courseimage instead. return; } diff --git a/src/core/features/courses/services/courses.ts b/src/core/features/courses/services/courses.ts index 8960cba95..bd97e11e9 100644 --- a/src/core/features/courses/services/courses.ts +++ b/src/core/features/courses/services/courses.ts @@ -74,7 +74,7 @@ export class CoreCoursesProvider { * Whether current site supports getting course options. * * @returns Whether current site supports getting course options. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ canGetAdminAndNavOptions(): boolean { return true; @@ -606,7 +606,7 @@ export class CoreCoursesProvider { * Check if get courses by field WS is available in a certain site. * * @returns Whether get courses by field is available. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ isGetCoursesByFieldAvailable(): boolean { return true; @@ -616,7 +616,7 @@ export class CoreCoursesProvider { * Check if get courses by field WS is available in a certain site, by site ID. * * @returns Promise resolved with boolean: whether get courses by field is available. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async isGetCoursesByFieldAvailableInSite(): Promise { return true; @@ -1041,7 +1041,7 @@ export class CoreCoursesProvider { * @param courseId Course ID. * @param siteId Site Id. If not defined, use current site. * @returns Promise resolved when the data is invalidated. - * @deprecated since 4.3, use CoreEnrol.invalidateCourseEnrolmentMethods instead. + * @deprecated since 4.3 use CoreEnrol.invalidateCourseEnrolmentMethods instead. */ async invalidateCourseEnrolmentMethods(courseId: number, siteId?: string): Promise { return CoreEnrol.invalidateCourseEnrolmentMethods(courseId, siteId); @@ -1053,7 +1053,7 @@ export class CoreCoursesProvider { * @param instanceId Guest instance ID. * @param siteId Site Id. If not defined, use current site. * @returns Promise resolved when the data is invalidated. - * @deprecated since 4.3, use CoreEnrolDelegate.invalidate instead. + * @deprecated since 4.3 use CoreEnrolDelegate.invalidate instead. */ async invalidateCourseGuestEnrolmentInfo(instanceId: number, siteId?: string): Promise { return AddonEnrolGuest.invalidateGuestEnrolmentInfo(instanceId, siteId); @@ -1249,7 +1249,7 @@ export class CoreCoursesProvider { * @param siteId Site ID. If not defined, use current site. * @returns Promise resolved if the user is enrolled. If the password is invalid, the promise is rejected * with an object with errorcode = CoreCoursesProvider.ENROL_INVALID_KEY. - * @deprecated since 4.3, use CoreEnrolDelegate.enrol instead. + * @deprecated since 4.3 use CoreEnrolDelegate.enrol instead. */ async selfEnrol(courseId: number, password: string = '', instanceId?: number, siteId?: string): Promise { return AddonEnrolSelf.selfEnrol(courseId, password, instanceId, siteId); @@ -1462,7 +1462,7 @@ export type CoreCourseGetCoursesData = CoreEnrolledCourseBasicData & { /** * Number of weeks/topics. * - * @deprecated use courseformatoptions. + * @deprecated use courseformatoptions. This attribute is deprecated in moodle since 2.4 but still present. */ numsections?: number; maxbytes?: number; // Largest size of file that can be uploaded into the course. @@ -1470,7 +1470,7 @@ export type CoreCourseGetCoursesData = CoreEnrolledCourseBasicData & { /** * How the hidden sections in the course are displayed to students. * - * @deprecated use courseformatoptions. + * @deprecated use courseformatoptions. This attribute is deprecated in moodle since 2.4 but still present. */ hiddensections?: number; groupmode?: number; // No group, separate, visible. @@ -1704,14 +1704,14 @@ export type CoreCourseUserAdminOrNavOptionIndexed = { /** * Course enrolment basic info. * - * @deprecated since 4.3 use CoreEnrolEnrolmentInfo instead. + * @deprecated since 4.3. Use CoreEnrolEnrolmentInfo instead. */ export type CoreCourseEnrolmentInfo = CoreEnrolEnrolmentInfo; /** * Course enrolment method. * - * @deprecated since 4.3 use CoreEnrolEnrolmentMethod instead. + * @deprecated since 4.3. Use CoreEnrolEnrolmentMethod instead. */ export type CoreCourseEnrolmentMethod = CoreEnrolEnrolmentMethod; diff --git a/src/core/features/enrol/services/enrol.ts b/src/core/features/enrol/services/enrol.ts index 28fd198ed..63117019f 100644 --- a/src/core/features/enrol/services/enrol.ts +++ b/src/core/features/enrol/services/enrol.ts @@ -97,7 +97,7 @@ export class CoreEnrolService { await Promise.all([ site.invalidateWsCacheForKey(this.getCourseEnrolmentMethodsCacheKey(courseId)), - site.invalidateWsCacheForKey(`mmCourses:enrolmentmethods:${courseId}`), // @todo: Remove after 4.3 release. + site.invalidateWsCacheForKey(`mmCourses:enrolmentmethods:${courseId}`), // @todo 4.4 Remove after 4.3 release. ]); } diff --git a/src/core/features/filter/services/filter.ts b/src/core/features/filter/services/filter.ts index 737852d06..c1901a322 100644 --- a/src/core/features/filter/services/filter.ts +++ b/src/core/features/filter/services/filter.ts @@ -64,7 +64,7 @@ export class CoreFilterProvider { * Returns whether or not WS get available in context is available. * * @returns Promise resolved with true if ws is available, false otherwise. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async canGetAvailableInContext(): Promise { return true; @@ -74,7 +74,7 @@ export class CoreFilterProvider { * Returns whether or not WS get available in context is available in a certain site. * * @returns Promise resolved with true if ws is available, false otherwise. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ canGetAvailableInContextInSite(): boolean { return true; diff --git a/src/core/features/grades/services/grades-helper.ts b/src/core/features/grades/services/grades-helper.ts index 0dcb0b9ea..aa64747ea 100644 --- a/src/core/features/grades/services/grades-helper.ts +++ b/src/core/features/grades/services/grades-helper.ts @@ -65,7 +65,7 @@ export class CoreGradesHelperProvider { * * @param tableRow JSON object representing row of grades table data. * @returns Formatted row object. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ protected async formatGradeRow(tableRow: CoreGradesTableRow): Promise { const row: CoreGradesFormattedRow = { @@ -362,7 +362,7 @@ export class CoreGradesHelperProvider { * @param siteId Site ID. If not defined, current site. * @param ignoreCache True if it should ignore cached data (it will always fail in offline or server down). * @returns Promise to be resolved when the grades are retrieved. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async getGradeItem( courseId: number, @@ -377,6 +377,7 @@ export class CoreGradesHelperProvider { throw new CoreError('Couldn\'t get grade item'); } + // eslint-disable-next-line deprecation/deprecation return this.getGradesTableRow(grades, gradeId); } @@ -465,7 +466,7 @@ export class CoreGradesHelperProvider { * @param table JSON object representing a table with data. * @param gradeId Grade Object identifier. * @returns Formatted HTML table. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async getGradesTableRow(table: CoreGradesTable, gradeId: number): Promise { if (table.tabledata) { @@ -478,6 +479,7 @@ export class CoreGradesHelperProvider { ); if (selectedRow) { + // eslint-disable-next-line deprecation/deprecation return await this.formatGradeRow(selectedRow); } } @@ -491,7 +493,7 @@ export class CoreGradesHelperProvider { * @param table JSON object representing a table with data. * @param moduleId Grade Object identifier. * @returns Formatted HTML table. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async getModuleGradesTableRows(table: CoreGradesTable, moduleId: number): Promise { if (!table.tabledata) { @@ -513,6 +515,7 @@ export class CoreGradesHelperProvider { } return false; + // eslint-disable-next-line deprecation/deprecation }).map((row) => this.formatGradeRow(row))); } diff --git a/src/core/features/grades/services/grades.ts b/src/core/features/grades/services/grades.ts index 85ae19c4e..58471cc41 100644 --- a/src/core/features/grades/services/grades.ts +++ b/src/core/features/grades/services/grades.ts @@ -346,7 +346,7 @@ export class CoreGradesProvider { * Returns whether or not WS Grade Items is available. * * @returns True if ws is available, false otherwise. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async isGradeItemsAvailable(): Promise { return true; diff --git a/src/core/features/login/services/login-helper.ts b/src/core/features/login/services/login-helper.ts index bbf4c2810..5a92e27f0 100644 --- a/src/core/features/login/services/login-helper.ts +++ b/src/core/features/login/services/login-helper.ts @@ -365,7 +365,7 @@ export class CoreLoginHelperProvider { * Get fixed site or sites. * * @returns Fixed site or list of fixed sites. - * @deprecated since 4.2.0. Use CoreConstants.CONFIG.sites or getAvailableSites() instead. + * @deprecated since 4.2. Use CoreConstants.CONFIG.sites or getAvailableSites() instead. */ getFixedSites(): string | CoreLoginSiteInfo[] { const notStagingSites = CoreConstants.CONFIG.sites.filter(site => !site.staging); @@ -482,7 +482,7 @@ export class CoreLoginHelperProvider { * Check if the app is configured to use several fixed URLs. * * @returns Whether there are several fixed URLs. - * @deprecated 4.2.0 Use CoreConstants.CONFIG.sites.length > 1 instead. + * @deprecated since 4.2. Use CoreConstants.CONFIG.sites.length > 1 instead. */ async hasSeveralFixedSites(): Promise { const sites = await this.getAvailableSites(); @@ -523,7 +523,7 @@ export class CoreLoginHelperProvider { * Check if the app is configured to use a fixed URL (only 1). * * @returns Whether there is 1 fixed URL. - * @deprecated 4.2.0 Use isSingleFixedSite instead. + * @deprecated since 4.2. Use isSingleFixedSite instead. */ isFixedUrlSet(): boolean { return CoreConstants.CONFIG.sites.filter(site => !site.staging).length === 1; @@ -909,7 +909,7 @@ export class CoreLoginHelperProvider { * * @param typeOfLogin TypeOfLogin.BROWSER or TypeOfLogin.EMBEDDED. * @returns True if confirm modal should be shown, false otherwise. - * @deprecated since 4.3 Not used anymore. See shouldSkipCredentialsScreenOnSSO. + * @deprecated since 4.3. Not used anymore. See shouldSkipCredentialsScreenOnSSO. */ shouldShowSSOConfirm(typeOfLogin: TypeOfLogin): boolean { return !this.isSSOEmbeddedBrowser(typeOfLogin) && !this.shouldSkipCredentialsScreenOnSSO(); diff --git a/src/core/features/pushnotifications/services/pushnotifications.ts b/src/core/features/pushnotifications/services/pushnotifications.ts index ac98d0e9b..8b9091187 100644 --- a/src/core/features/pushnotifications/services/pushnotifications.ts +++ b/src/core/features/pushnotifications/services/pushnotifications.ts @@ -386,6 +386,7 @@ export class CorePushNotificationsProvider { data.category = itemCategory; data.moodleaction = wsName; + // eslint-disable-next-line deprecation/deprecation return this.logEvent('view_item', data); } @@ -407,6 +408,7 @@ export class CorePushNotificationsProvider { data.moodleaction = wsName; data.category = itemCategory; + // eslint-disable-next-line deprecation/deprecation return this.logEvent('view_item_list', data); } diff --git a/src/core/features/question/services/question.ts b/src/core/features/question/services/question.ts index d64438748..5f1724d1f 100644 --- a/src/core/features/question/services/question.ts +++ b/src/core/features/question/services/question.ts @@ -385,7 +385,7 @@ export class CoreQuestionProvider { const parsedQuestions: CoreQuestionQuestionParsed[] = questions; parsedQuestions.forEach((question) => { - if (typeof question.questionnumber === 'undefined' && typeof question.number === 'number') { + if (question.questionnumber === undefined && typeof question.number === 'number') { question.questionnumber = String(question.number); } @@ -603,7 +603,7 @@ export type CoreQuestionQuestionWSData = { maxmark?: number; // The maximum mark possible for this question attempt. settings?: string; // Question settings (JSON encoded). - /** @deprecated Since 4.2. Use questionnumber instead. */ + /** @deprecatedonmoodle since 4.2. Use questionnumber instead. */ number?: number; // eslint-disable-line id-blacklist }; /** diff --git a/src/core/features/rating/services/rating.ts b/src/core/features/rating/services/rating.ts index 7e92bf797..a607e75ea 100644 --- a/src/core/features/rating/services/rating.ts +++ b/src/core/features/rating/services/rating.ts @@ -48,7 +48,7 @@ export class CoreRatingProvider { * Returns whether the web serivce to add ratings is available. * * @returns If WS is available. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ isAddRatingWSAvailable(): boolean { return true; diff --git a/src/core/features/settings/pages/general/general.ts b/src/core/features/settings/pages/general/general.ts index 88a498b77..de859cb2d 100644 --- a/src/core/features/settings/pages/general/general.ts +++ b/src/core/features/settings/pages/general/general.ts @@ -18,7 +18,6 @@ import { CoreConfig } from '@services/config'; import { CoreEvents } from '@singletons/events'; import { CoreLang } from '@services/lang'; import { CoreDomUtils } from '@services/utils/dom'; -import { CorePushNotifications } from '@features/pushnotifications/services/pushnotifications'; import { CoreSettingsHelper, CoreColorScheme, CoreZoomLevel } from '../../services/settings-helper'; import { CoreIframeUtils } from '@services/utils/iframe'; import { Diagnostic, Translate } from '@singletons'; @@ -250,7 +249,7 @@ export class CoreSettingsGeneralPage { ev.stopPropagation(); ev.preventDefault(); - await CorePushNotifications.enableAnalytics(this.analyticsEnabled); + await CoreAnalytics.enableAnalytics(this.analyticsEnabled); CoreConfig.set(CoreConstants.SETTINGS_ANALYTICS_ENABLED, this.analyticsEnabled ? 1 : 0); } diff --git a/src/core/features/siteplugins/classes/handlers/course-format-handler.ts b/src/core/features/siteplugins/classes/handlers/course-format-handler.ts index c6b7914d8..f6e736251 100644 --- a/src/core/features/siteplugins/classes/handlers/course-format-handler.ts +++ b/src/core/features/siteplugins/classes/handlers/course-format-handler.ts @@ -40,6 +40,7 @@ export class CoreSitePluginsCourseFormatHandler extends CoreSitePluginsBaseHandl */ displayCourseIndex(): boolean { // Use displaysectionselector while is not completely deprecated. + // eslint-disable-next-line deprecation/deprecation return this.handlerSchema.displaycourseindex ?? this.handlerSchema.displaysectionselector ?? true; } diff --git a/src/core/features/siteplugins/components/course-format/course-format.ts b/src/core/features/siteplugins/components/course-format/course-format.ts index ee72880e0..299f2459c 100644 --- a/src/core/features/siteplugins/components/course-format/course-format.ts +++ b/src/core/features/siteplugins/components/course-format/course-format.ts @@ -37,7 +37,11 @@ export class CoreSitePluginsCourseFormatComponent implements OnChanges { @Input() initialSectionId?: number; // The section to load first (by ID). @Input() initialSectionNumber?: number; // The section to load first (by number). @Input() moduleId?: number; // The module ID to scroll to. Must be inside the initial selected section. - // Notify when any module completion changes. @deprecated since 4.0, now we use CoreEvents. + /** + * Notify when any module completion changes. + * + * @deprecated since 4.0. Use CoreEvents instead. + */ @Output() completionChanged = new EventEmitter(); // Special input, allows access to the parent instance properties and methods. @@ -54,7 +58,7 @@ export class CoreSitePluginsCourseFormatComponent implements OnChanges { data?: Record; /** - * Detect changes on input properties. + * @inheritdoc */ ngOnChanges(): void { if (!this.course || !this.course.format) { @@ -83,6 +87,7 @@ export class CoreSitePluginsCourseFormatComponent implements OnChanges { initialSectionId: this.initialSectionId, initialSectionNumber: this.initialSectionNumber, moduleId: this.moduleId, + // eslint-disable-next-line deprecation/deprecation completionChanged: this.completionChanged, coreCourseFormatComponent: this.coreCourseFormatComponent, }; diff --git a/src/core/features/siteplugins/components/module-index/module-index.ts b/src/core/features/siteplugins/components/module-index/module-index.ts index 78caae070..0b22b9796 100644 --- a/src/core/features/siteplugins/components/module-index/module-index.ts +++ b/src/core/features/siteplugins/components/module-index/module-index.ts @@ -70,7 +70,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C */ refreshIcon = CoreConstants.ICON_REFRESH; /** - * @deprecated since 4.0.. It won't be populated anymore. + * @deprecated since 4.0. It won't be populated anymore. */ prefetchStatus?: string; /** @@ -142,6 +142,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C // Get the data for the context menu. this.description = this.module.description; + // eslint-disable-next-line deprecation/deprecation this.externalUrl = this.module.url; } @@ -180,7 +181,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C /** * Expand the description. * - * @deprecated since 4.0 + * @deprecated since 4.0. */ expandDescription(): void { this.openModuleSummary(); @@ -222,7 +223,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C /** * Prefetch the module. * - * @deprecated since 4.0 + * @deprecated since 4.0. */ async prefetch(): Promise { try { @@ -242,7 +243,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C /** * Confirm and remove downloaded files. * - * @deprecated since 4.0 + * @deprecated since 4.0. */ async removeFiles(): Promise { let modal: CoreIonLoadingElement | undefined; diff --git a/src/core/features/siteplugins/services/siteplugins.ts b/src/core/features/siteplugins/services/siteplugins.ts index 26257cbe1..527f28a0f 100644 --- a/src/core/features/siteplugins/services/siteplugins.ts +++ b/src/core/features/siteplugins/services/siteplugins.ts @@ -395,7 +395,7 @@ export class CoreSitePluginsProvider { * Check if the get content WS is available. * * @returns If get content WS is available. - * @deprecated since app 4.0 + * @deprecated since 4.0 */ isGetContentAvailable(): boolean { return true; @@ -905,7 +905,7 @@ export type CoreSitePluginsCourseFormatHandlerData = CoreSitePluginsHandlerCommo canviewallsections?: boolean; displayenabledownload?: boolean; /** - * @deprecated on 4.0, use displaycourseindex instead. + * @deprecated since 4.0. Use displaycourseindex instead. */ displaysectionselector?: boolean; displaycourseindex?: boolean; diff --git a/src/core/features/user/services/user-helper.ts b/src/core/features/user/services/user-helper.ts index 42dc7f60a..55ea62dd8 100644 --- a/src/core/features/user/services/user-helper.ts +++ b/src/core/features/user/services/user-helper.ts @@ -89,7 +89,7 @@ export class CoreUserHelperProvider { * @param city City. * @param country Country. * @returns Formatted address. - * @deprecated since 4.3 Not used anymore. + * @deprecated since 4.3. Not used anymore. */ formatAddress(address?: string, city?: string, country?: string): string { const separator = Translate.instant('core.listsep'); diff --git a/src/core/features/user/services/user.ts b/src/core/features/user/services/user.ts index 65ca5a1aa..3cb7203ee 100644 --- a/src/core/features/user/services/user.ts +++ b/src/core/features/user/services/user.ts @@ -113,7 +113,7 @@ export class CoreUserProvider { * Check if WS to update profile picture is available in site. * * @returns Promise resolved with boolean: whether it's available. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ async canUpdatePicture(): Promise { return true; @@ -123,7 +123,7 @@ export class CoreUserProvider { * Check if WS to search participants is available in site. * * @returns Whether it's available. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ canUpdatePictureInSite(): boolean { return true; diff --git a/src/core/pipes/pipes.module.ts b/src/core/pipes/pipes.module.ts index a45223af7..a7783dbd7 100644 --- a/src/core/pipes/pipes.module.ts +++ b/src/core/pipes/pipes.module.ts @@ -34,6 +34,7 @@ import { CoreToLocaleStringPipe } from './to-locale-string'; CoreNoTagsPipe, CoreSecondsToHMSPipe, CoreTimeAgoPipe, + // eslint-disable-next-line deprecation/deprecation CoreToLocaleStringPipe, ], exports: [ @@ -45,6 +46,7 @@ import { CoreToLocaleStringPipe } from './to-locale-string'; CoreNoTagsPipe, CoreSecondsToHMSPipe, CoreTimeAgoPipe, + // eslint-disable-next-line deprecation/deprecation CoreToLocaleStringPipe, ], }) diff --git a/src/core/services/app.ts b/src/core/services/app.ts index 0a4f9031e..3951685d7 100644 --- a/src/core/services/app.ts +++ b/src/core/services/app.ts @@ -272,7 +272,7 @@ export class CoreAppProvider { * Checks if the app is running in a mobile or tablet device (Cordova). * * @returns Whether the app is running in a mobile or tablet device. - * @deprecated since 4.1. use CorePlatform instead. + * @deprecated since 4.1. Use CorePlatform instead. */ isMobile(): boolean { return CorePlatform.isMobile(); @@ -291,7 +291,7 @@ export class CoreAppProvider { * Returns whether we are online. * * @returns Whether the app is online. - * @deprecated since 4.1.0. Use CoreNetwork instead. + * @deprecated since 4.1. Use CoreNetwork instead. */ isOnline(): boolean { return CoreNetwork.isOnline(); @@ -301,7 +301,7 @@ export class CoreAppProvider { * Check if device uses a limited connection. * * @returns Whether the device uses a limited connection. - * @deprecated since 4.1.0. Use CoreNetwork instead. + * @deprecated since 4.1. Use CoreNetwork instead. */ isNetworkAccessLimited(): boolean { return CoreNetwork.isNetworkAccessLimited(); @@ -311,7 +311,7 @@ export class CoreAppProvider { * Check if device uses a wifi connection. * * @returns Whether the device uses a wifi connection. - * @deprecated since 4.1.0. Use CoreNetwork instead. + * @deprecated since 4.1. Use CoreNetwork instead. */ isWifi(): boolean { return CoreNetwork.isWifi(); @@ -576,7 +576,7 @@ export class CoreAppProvider { * Set value of forceOffline flag. If true, the app will think the device is offline. * * @param value Value to set. - * @deprecated since 4.1.0. Use CoreNetwork.setForceConnectionMode instead. + * @deprecated since 4.1. Use CoreNetwork.setForceConnectionMode instead. */ setForceOffline(value: boolean): void { CoreNetwork.setForceConnectionMode(value ? CoreNetworkConnection.NONE : CoreNetworkConnection.WIFI); diff --git a/src/core/services/local-notifications.ts b/src/core/services/local-notifications.ts index 8992c01aa..3a776001d 100644 --- a/src/core/services/local-notifications.ts +++ b/src/core/services/local-notifications.ts @@ -154,9 +154,7 @@ export class CoreLocalNotificationsProvider { * @returns Promise resolved when the notifications are cancelled. */ async cancelSiteNotifications(siteId: string): Promise { - if (!this.isAvailable()) { - return; - } else if (!siteId) { + if (!siteId) { throw new Error('No site ID supplied.'); } diff --git a/src/core/services/sites.ts b/src/core/services/sites.ts index 07db6e636..e76c54684 100644 --- a/src/core/services/sites.ts +++ b/src/core/services/sites.ts @@ -413,7 +413,7 @@ export class CoreSitesProvider { * * @param siteUrl URL of the site to check. * @returns A promise to be resolved if the site exists. - * @deprecated since app 4.0. Now the app calls uses tool_mobile_get_public_config to check if site exists. + * @deprecated since 4.0. Now the app calls uses tool_mobile_get_public_config to check if site exists. */ async siteExists(siteUrl: string): Promise { let data: CoreSitesLoginTokenResponse; @@ -703,7 +703,7 @@ export class CoreSitesProvider { * Function for determine which service we should use (default or extended plugin). * * @returns The service shortname. - * @deprecated since app 4.0 + * @deprecated since 4.0. */ determineService(): string { return CoreConstants.CONFIG.wsservice; @@ -2132,7 +2132,9 @@ export type CoreSiteCheckResponse = { service: string; /** - * Code of the warning message to show to the user. @deprecated since app 4.0 + * Code of the warning message to show to the user. + * + * @deprecated since 4.0. */ warning?: string; diff --git a/src/core/services/utils/dom.ts b/src/core/services/utils/dom.ts index 9bde8deb5..61d3becf7 100644 --- a/src/core/services/utils/dom.ts +++ b/src/core/services/utils/dom.ts @@ -106,7 +106,7 @@ export class CoreDomUtilsProvider { * @param element DOM Element. * @param selector Selector to search. * @returns Closest ancestor. - * @deprecated since app 4.0 Not needed anymore since it's supported on both Android and iOS. Use closest instead. + * @deprecated since 4.0. Not needed anymore since it's supported on both Android and iOS. Use closest instead. */ closest(element: Element | undefined | null, selector: string): Element | null { return element?.closest(selector) ?? null; @@ -404,7 +404,7 @@ export class CoreDomUtilsProvider { * @param useBorder Whether to use borders to calculate the measure. * @param innerMeasure If inner measure is needed: padding, margin or borders will be substracted. * @returns Height in pixels. - * @deprecated since app 4.0 Use getBoundingClientRect.height instead. + * @deprecated since 4.0 Use getBoundingClientRect.height instead. */ getElementHeight( element: HTMLElement, @@ -413,6 +413,7 @@ export class CoreDomUtilsProvider { useBorder?: boolean, innerMeasure?: boolean, ): number { + // eslint-disable-next-line deprecation/deprecation return this.getElementMeasure(element, false, usePadding, useMargin, useBorder, innerMeasure); } @@ -426,7 +427,7 @@ export class CoreDomUtilsProvider { * @param useBorder Whether to use borders to calculate the measure. * @param innerMeasure If inner measure is needed: padding, margin or borders will be substracted. * @returns Measure in pixels. - * @deprecated since app 4.0 Use getBoundingClientRect.height or width instead. + * @deprecated since 4.0. Use getBoundingClientRect.height or width instead. */ getElementMeasure( element: HTMLElement, @@ -499,7 +500,7 @@ export class CoreDomUtilsProvider { * @param useBorder Whether to use borders to calculate the measure. * @param innerMeasure If inner measure is needed: padding, margin or borders will be substracted. * @returns Width in pixels. - * @deprecated since app 4.0 Use getBoundingClientRect.width instead. + * @deprecated since 4.0. Use getBoundingClientRect.width instead. */ getElementWidth( element: HTMLElement, @@ -508,6 +509,7 @@ export class CoreDomUtilsProvider { useBorder?: boolean, innerMeasure?: boolean, ): number { + // eslint-disable-next-line deprecation/deprecation return this.getElementMeasure(element, true, usePadding, useMargin, useBorder, innerMeasure); } @@ -518,7 +520,7 @@ export class CoreDomUtilsProvider { * @param selector Selector to find the element to gets the position. * @param positionParentClass Parent Class where to stop calculating the position. Default inner-scroll. * @returns positionLeft, positionTop of the element relative to. - * @deprecated since app 4.0. Use CoreDom.getRelativeElementPosition instead. + * @deprecated since 4.0. Use CoreDom.getRelativeElementPosition instead. */ getElementXY(element: HTMLElement, selector?: string, positionParentClass = 'inner-scroll'): [number, number] | null { if (selector) { @@ -642,7 +644,7 @@ export class CoreDomUtilsProvider { * * @param element The root element of the component/directive. * @returns The instance, undefined if not found. - * @deprecated since 4.0.0. Use CoreDirectivesRegistry instead. + * @deprecated since 4.0. Use CoreDirectivesRegistry instead. */ getInstanceByElement(element: Element): T | undefined { return CoreDirectivesRegistry.resolve(element) ?? undefined; @@ -675,7 +677,7 @@ export class CoreDomUtilsProvider { * @param retries Number of retries before giving up. * @param retryAfter Milliseconds to wait before retrying if the element wasn't found. * @returns Resolved if found, rejected if too many tries. - * @deprecated since app 4.0 Use CoreDom.waitToBeInsideElement instead. + * @deprecated since 4.0. Use CoreDom.waitToBeInsideElement instead. */ async waitElementToExist( findFunction: () => HTMLElement | null, @@ -691,6 +693,7 @@ export class CoreDomUtilsProvider { if (!element) { await CoreUtils.wait(retryAfter); + // eslint-disable-next-line deprecation/deprecation return this.waitElementToExist(findFunction, retries - 1); } @@ -852,7 +855,7 @@ export class CoreDomUtilsProvider { * Remove a component/directive instance using the DOM Element. * * @param element The root element of the component/directive. - * @deprecated since 4.0.0. It's no longer necessary to remove instances. + * @deprecated since 4.0. It's no longer necessary to remove instances. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars removeInstanceByElement(element: Element): void { @@ -863,7 +866,7 @@ export class CoreDomUtilsProvider { * Remove a component/directive instance using the ID. * * @param id The ID to remove. - * @deprecated since 4.0.0. It's no longer necessary to remove instances. + * @deprecated since 4.0. It's no longer necessary to remove instances. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars removeInstanceById(id: string): void { @@ -1001,7 +1004,7 @@ export class CoreDomUtilsProvider { * @param scrollParentClass Not used anymore. * @param duration Duration of the scroll animation in milliseconds. * @returns True if the element is found, false otherwise. - * @deprecated since app 4.0 Use CoreDom.scrollToElement instead. + * @deprecated since 4.0. Use CoreDom.scrollToElement instead. */ scrollToElement(content: IonContent, element: HTMLElement, scrollParentClass?: string, duration?: number): boolean { CoreDom.scrollToElement(element, undefined, { duration }); @@ -1018,7 +1021,7 @@ export class CoreDomUtilsProvider { * @param scrollParentClass Not used anymore. * @param duration Duration of the scroll animation in milliseconds. * @returns True if the element is found, false otherwise. - * @deprecated since app 4.0 Use CoreDom.scrollToElement instead. + * @deprecated since 4.0. Use CoreDom.scrollToElement instead. */ scrollToElementBySelector( container: HTMLElement | null, @@ -1042,7 +1045,7 @@ export class CoreDomUtilsProvider { * * @param container The element that contains the element that must be scrolled. * @returns True if the element is found, false otherwise. - * @deprecated since app 4.0 Use CoreDom.scrollToInputError instead. + * @deprecated since 4.0. Use CoreDom.scrollToInputError instead. */ scrollToInputError(container: HTMLElement | null): boolean { if (!container) { @@ -1669,7 +1672,7 @@ export class CoreDomUtilsProvider { * * @param element The root element of the component/directive. * @param instance The instance to store. - * @deprecated since 4.0.0. Use CoreDirectivesRegistry instead. + * @deprecated since 4.0. Use CoreDirectivesRegistry instead. */ storeInstanceByElement(element: Element, instance: unknown): void { CoreDirectivesRegistry.register(element, instance); @@ -2027,7 +2030,7 @@ export class CoreDomUtilsProvider { ): void { document.documentElement.classList.toggle(className, enable); - // @deprecated since 4.1 + // @deprecated since 4.1. document.body.classList.toggle(className, enable && options.includeLegacy); } diff --git a/src/core/services/utils/iframe.ts b/src/core/services/utils/iframe.ts index 26985d187..50b28f91d 100644 --- a/src/core/services/utils/iframe.ts +++ b/src/core/services/utils/iframe.ts @@ -32,11 +32,9 @@ import { CoreContentLinksHelper } from '@features/contentlinks/services/contentl import { CorePath } from '@singletons/path'; import { CorePromisedValue } from '@classes/promised-value'; import { CorePlatform } from '@services/platform'; +import { FrameElement } from '@classes/element-controllers/FrameElementController'; -/** - * Possible types of frame elements. - */ -type CoreFrameElement = (HTMLIFrameElement | HTMLFrameElement | HTMLObjectElement | HTMLEmbedElement) & { +type CoreFrameElement = FrameElement & { window?: Window; getWindow?(): Window; }; @@ -64,6 +62,8 @@ export class CoreIframeUtilsProvider { * @returns True if frame is online and the app is offline, false otherwise. */ checkOnlineFrameInOffline(element: CoreFrameElement, isSubframe?: boolean): boolean { + // @todo Drop frame tag support to avoid deprecation. + // eslint-disable-next-line deprecation/deprecation const src = 'src' in element ? element.src : element.data; if (src && src != 'about:blank' && !CoreUrlUtils.isLocalFileUrl(src) && !CoreNetwork.isOnline()) { @@ -91,7 +91,8 @@ export class CoreIframeUtilsProvider { // Reload the frame. if ('src' in element) { // eslint-disable-next-line no-self-assign - element.src = element.src; + element.src = element.src; // eslint-disable-line deprecation/deprecation + } else { // eslint-disable-next-line no-self-assign element.data = element.data; @@ -231,18 +232,21 @@ export class CoreIframeUtilsProvider { * @returns Window and Document. */ getContentWindowAndDocument(element: CoreFrameElement): { window: Window | null; document: Document | null } { + // @todo Drop frame tag support to avoid deprecation. + // eslint-disable-next-line deprecation/deprecation const src = 'src' in element ? element.src : element.data; if (src !== 'about:blank' && !CoreUrlUtils.isLocalFileUrl(src)) { // No permissions to access the iframe. return { window: null, document: null }; } + // eslint-disable-next-line deprecation/deprecation let contentWindow: Window | null = 'contentWindow' in element ? element.contentWindow : null; let contentDocument: Document | null = null; try { - contentDocument = 'contentDocument' in element && element.contentDocument - ? element.contentDocument + contentDocument = 'contentDocument' in element && element.contentDocument // eslint-disable-line deprecation/deprecation + ? element.contentDocument // eslint-disable-line deprecation/deprecation : contentWindow && contentWindow.document; } catch { // Ignore errors. @@ -421,8 +425,9 @@ export class CoreIframeUtilsProvider { const scheme = CoreUrlUtils.getUrlScheme(url); if (!scheme) { // It's a relative URL, use the frame src to create the full URL. + // @todo Drop frame tag support to avoid deprecation. const src = element - ? ('src' in element ? element.src : element.data) + ? ('src' in element ? element.src : element.data) // eslint-disable-line deprecation/deprecation : null; if (src) { const dirAndFile = CoreFile.getFileAndDirectoryFromPath(src); @@ -492,7 +497,7 @@ export class CoreIframeUtilsProvider { // Scheme suggests it's an external resource. event && event.preventDefault(); - const frameSrc = element && (( element).src || ( element).data); + const frameSrc = element && (( element).src || ( element).data); // If the frame is not local, check the target to identify how to treat the link. if ( diff --git a/src/core/services/utils/time.ts b/src/core/services/utils/time.ts index 049c2825f..9e8417c40 100644 --- a/src/core/services/utils/time.ts +++ b/src/core/services/utils/time.ts @@ -161,7 +161,7 @@ export class CoreTimeUtilsProvider { * @param seconds A number of seconds * @param precision Number of elements to have in precision. * @returns Seconds in a human readable format. - * @deprecated since app 4.0. Use CoreTime.formatTime instead. + * @deprecated since 4.0. Use CoreTime.formatTime instead. */ formatTime(seconds: number, precision = 2): string { return CoreTime.formatTime(seconds, precision); @@ -172,7 +172,7 @@ export class CoreTimeUtilsProvider { * * @param duration Seconds * @returns Short human readable text. - * @deprecated since app 4.0. Use CoreTime.formatTimeShort instead. + * @deprecated since 4.0. Use CoreTime.formatTimeShort instead. */ formatTimeShort(duration: number): string { return CoreTime.formatTimeShort(duration); @@ -184,7 +184,7 @@ export class CoreTimeUtilsProvider { * @param duration Duration in seconds * @param precision Number of elements to have in precision. 0 or undefined to full precission. * @returns Duration in a human readable format. - * @deprecated since app 4.0. Use CoreTime.formatTime instead. + * @deprecated since 4.0. Use CoreTime.formatTime instead. */ formatDuration(duration: number, precision?: number): string { return CoreTime.formatTime(duration, precision); @@ -195,7 +195,7 @@ export class CoreTimeUtilsProvider { * * @param duration Duration in seconds * @returns Duration in a short human readable format. - * @deprecated since app 4.0. Use CoreTime.formatTimeShort instead. + * @deprecated since 4.0. Use CoreTime.formatTimeShort instead. */ formatDurationShort(duration: number): string { return CoreTime.formatTimeShort(duration); diff --git a/src/core/services/utils/utils.ts b/src/core/services/utils/utils.ts index 0d1ee1649..147930bb8 100644 --- a/src/core/services/utils/utils.ts +++ b/src/core/services/utils/utils.ts @@ -1182,6 +1182,7 @@ export class CoreUtilsProvider { * @param options Options. */ async openInBrowser(url: string, options: CoreUtilsOpenInBrowserOptions = {}): Promise { + // eslint-disable-next-line deprecation/deprecation const originaUrl = CoreUrlUtils.unfixPluginfileURL(options.originalUrl ?? options.browserWarningUrl ?? url); if (options.showBrowserWarning || options.showBrowserWarning === undefined) { try { @@ -1412,7 +1413,7 @@ export class CoreUtilsProvider { * Create a deferred promise that can be resolved or rejected explicitly. * * @returns The deferred promise. - * @deprecated since app 4.1. Use CorePromisedValue instead. + * @deprecated since 4.1. Use CorePromisedValue instead. */ promiseDefer(): CorePromisedValue { return new CorePromisedValue(); @@ -1924,7 +1925,7 @@ export type CoreUtilsOpenInBrowserOptions = { showBrowserWarning?: boolean; // Whether to display a warning before opening in browser. Defaults to true. originalUrl?: string; // Original URL to open (in case the URL was treated, e.g. to add a token or an auto-login). /** - * @deprecated since 4.3, use originalUrl instead. + * @deprecated since 4.3. Use originalUrl instead. */ browserWarningUrl?: string; }; diff --git a/src/core/singletons/events.ts b/src/core/singletons/events.ts index 4f33ad1fa..01cb7f8b1 100644 --- a/src/core/singletons/events.ts +++ b/src/core/singletons/events.ts @@ -39,6 +39,7 @@ export interface CoreEventsData { [CoreEvents.SITE_ADDED]: CoreEventSiteAddedData; [CoreEvents.SITE_DELETED]: CoreSite; [CoreEvents.SESSION_EXPIRED]: CoreEventSessionExpiredData; + // eslint-disable-next-line deprecation/deprecation [CoreEvents.CORE_LOADING_CHANGED]: CoreEventLoadingChangedData; [CoreEvents.COURSE_STATUS_CHANGED]: CoreEventCourseStatusChanged; [CoreEvents.PACKAGE_STATUS_CHANGED]: CoreEventPackageStatusChanged; @@ -84,11 +85,7 @@ export class CoreEvents { static readonly SITE_UPDATED = 'site_updated'; static readonly SITE_DELETED = 'site_deleted'; static readonly COMPLETION_MODULE_VIEWED = 'completion_module_viewed'; - /** - * Deprecated on 4.0 use COMPLETION_CHANGED instead. - */ static readonly MANUAL_COMPLETION_CHANGED = 'manual_completion_changed'; - static readonly COMPLETION_CHANGED = 'completion_changed'; static readonly USER_DELETED = 'user_deleted'; static readonly USER_SUSPENDED = 'user_suspended'; static readonly USER_NO_LOGIN = 'user_no_login'; @@ -108,7 +105,7 @@ export class CoreEvents { static readonly FILE_SHARED = 'file_shared'; static readonly KEYBOARD_CHANGE = 'keyboard_change'; /** - * @deprecated since app 4.0. Use CoreDirectivesRegistry promises instead. + * @deprecated since 4.0. Use CoreDirectivesRegistry promises instead. */ static readonly CORE_LOADING_CHANGED = 'core_loading_changed'; static readonly ORIENTATION_CHANGE = 'orientation_change'; diff --git a/src/core/singletons/index.ts b/src/core/singletons/index.ts index 5cad775d7..493dd35a0 100644 --- a/src/core/singletons/index.ts +++ b/src/core/singletons/index.ts @@ -142,6 +142,8 @@ export function makeSingleton( // eslint-disabl throw new Error('Can\'t resolve a singleton instance without an injector'); } + // @todo Check type to avoid deprecation. + // eslint-disable-next-line deprecation/deprecation const instance = injector.get(injectionToken); singleton.setInstance(instance); diff --git a/src/core/singletons/text.ts b/src/core/singletons/text.ts index e4ec26140..93fd9580c 100644 --- a/src/core/singletons/text.ts +++ b/src/core/singletons/text.ts @@ -76,7 +76,7 @@ export class CoreText { * @param leftPath Left path. * @param rightPath Right path. * @returns Concatenated path. - * @deprecated since 4.1.0. Please use CorePath.concatenatePaths instead. + * @deprecated since 4.1. Use CorePath.concatenatePaths instead. */ static concatenatePaths(leftPath: string, rightPath: string): string { return CorePath.concatenatePaths(leftPath, rightPath);