diff --git a/.eslintrc.js b/.eslintrc.js index 0de6fac902a..f4333f93d21 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,4 +20,9 @@ module.exports = { ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'], }], }, + settings: { + jsdoc: { + mode: 'typescript', + }, + }, } diff --git a/apps/comments/src/activitytabviewplugin.js b/apps/comments/src/activitytabviewplugin.js index d4590886b2c..fbf65ea16e3 100644 --- a/apps/comments/src/activitytabviewplugin.js +++ b/apps/comments/src/activitytabviewplugin.js @@ -21,6 +21,8 @@ * */ +/** @typedef {import('jquery')} jQuery */ + (function() { OCA.Comments.ActivityTabViewPlugin = { diff --git a/apps/comments/src/utils/cancelableRequest.js b/apps/comments/src/utils/cancelableRequest.js index 1b9b33c37dc..7e956d6cfc3 100644 --- a/apps/comments/src/utils/cancelableRequest.js +++ b/apps/comments/src/utils/cancelableRequest.js @@ -25,7 +25,7 @@ import axios from '@nextcloud/axios' /** * Create a cancel token * - * @return {CancelTokenSource} + * @return {import('axios').CancelTokenSource} */ const createCancelToken = () => axios.CancelToken.source() diff --git a/core/src/OC/legacy-loader.js b/core/src/OC/legacy-loader.js index 07efbef0fc6..66687cf4de9 100644 --- a/core/src/OC/legacy-loader.js +++ b/core/src/OC/legacy-loader.js @@ -22,6 +22,7 @@ * */ +/** @typedef {import('jquery')} jQuery */ import $ from 'jquery' import { generateFilePath } from '@nextcloud/router' diff --git a/core/src/OC/menu.js b/core/src/OC/menu.js index 9522650c472..74d1b179ea8 100644 --- a/core/src/OC/menu.js +++ b/core/src/OC/menu.js @@ -23,6 +23,7 @@ */ import _ from 'underscore' +/** @typedef {import('jquery')} jQuery */ import $ from 'jquery' import { menuSpeed } from './constants' diff --git a/core/src/OC/notification.js b/core/src/OC/notification.js index 74499d5241b..f8c8feccd3c 100644 --- a/core/src/OC/notification.js +++ b/core/src/OC/notification.js @@ -26,6 +26,7 @@ */ import _ from 'underscore' +/** @typedef {import('jquery')} jQuery */ import $ from 'jquery' import { showMessage, TOAST_DEFAULT_TIMEOUT, TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs' @@ -162,7 +163,7 @@ export default { * @param {number} [options.timeout=7] timeout in seconds, if this is 0 it will show the message permanently * @param {boolean} [options.isHTML=false] an indicator for HTML notifications (true) or text (false) * @param {string} [options.type] notification type - * @return {JQuery} the toast element + * @return {JQuery} the toast element * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ showTemporary(text, options) { diff --git a/core/src/OCP/appconfig.js b/core/src/OCP/appconfig.js index b4062bdf850..600f63581d3 100644 --- a/core/src/OCP/appconfig.js +++ b/core/src/OCP/appconfig.js @@ -33,7 +33,6 @@ import OC from '../OC/index' * @param {object} [options.data] option data * @param {Function} [options.success] success callback * @param {Function} [options.error] error callback - * @internal */ function call(method, endpoint, options) { if ((method === 'post' || method === 'delete') && OC.PasswordConfirmation.requiresPasswordConfirmation()) { diff --git a/core/src/services/UnifiedSearchService.js b/core/src/services/UnifiedSearchService.js index dde36899869..32567ba6377 100644 --- a/core/src/services/UnifiedSearchService.js +++ b/core/src/services/UnifiedSearchService.js @@ -35,14 +35,14 @@ export const regexFilterNot = /-in:([a-z_-]+)/ig /** * Create a cancel token * - * @return {CancelTokenSource} + * @return {import('axios').CancelTokenSource} */ const createCancelToken = () => axios.CancelToken.source() /** * Get the list of available search providers * - * @return {Array} + * @return {Promise} */ export async function getTypes() { try { diff --git a/dist/comments-comments-app.js.map b/dist/comments-comments-app.js.map index b5196f48e7f..292337c7436 100644 Binary files a/dist/comments-comments-app.js.map and b/dist/comments-comments-app.js.map differ diff --git a/dist/comments-comments.js.map b/dist/comments-comments.js.map index cab31c188ef..fc6b3d607f8 100644 Binary files a/dist/comments-comments.js.map and b/dist/comments-comments.js.map differ diff --git a/dist/core-login.js.map b/dist/core-login.js.map index 75fdde7149b..4a5c4b772c8 100644 Binary files a/dist/core-login.js.map and b/dist/core-login.js.map differ diff --git a/dist/core-main.js.map b/dist/core-main.js.map index a5c1ae34ee5..af19025cd70 100644 Binary files a/dist/core-main.js.map and b/dist/core-main.js.map differ diff --git a/dist/core-unified-search.js.map b/dist/core-unified-search.js.map index 07bc890db0d..18cea6f6265 100644 Binary files a/dist/core-unified-search.js.map and b/dist/core-unified-search.js.map differ