diff options
author | Louis Chemineau <louis@chmn.me> | 2022-01-10 14:06:28 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-01-11 17:12:55 +0100 |
commit | d92cbf51493f0aa15745d2f9545cba2372eecec3 (patch) | |
tree | 349a555a74c99b40c20fcc470c26b7f7c0029f8d /core | |
parent | 7484abb6c07f2296abc2040ecd747ddf1d65e98e (diff) | |
download | nextcloud-server-d92cbf51493f0aa15745d2f9545cba2372eecec3.tar.gz nextcloud-server-d92cbf51493f0aa15745d2f9545cba2372eecec3.zip |
Typing corrections
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/tests/specs/files/clientSpec.js | 4 | ||||
-rw-r--r-- | core/src/OC/admin.js | 2 | ||||
-rw-r--r-- | core/src/OC/capabilities.js | 2 | ||||
-rw-r--r-- | core/src/OC/host.js | 8 | ||||
-rw-r--r-- | core/src/OC/index.js | 4 | ||||
-rw-r--r-- | core/src/OC/l10n.js | 6 | ||||
-rw-r--r-- | core/src/OC/menu.js | 2 | ||||
-rw-r--r-- | core/src/OC/notification.js | 6 | ||||
-rw-r--r-- | core/src/OC/plugins.js | 2 | ||||
-rw-r--r-- | core/src/OC/util.js | 4 | ||||
-rw-r--r-- | core/src/OCP/collaboration.js | 2 | ||||
-rw-r--r-- | core/src/OCP/comments.js | 2 | ||||
-rw-r--r-- | core/src/files/client.js | 8 | ||||
-rw-r--r-- | core/src/globals.js | 2 | ||||
-rw-r--r-- | core/src/jquery/exists.js | 2 | ||||
-rw-r--r-- | core/src/jquery/filterattr.js | 2 | ||||
-rw-r--r-- | core/src/jquery/octemplate.js | 16 | ||||
-rw-r--r-- | core/src/jquery/selectrange.js | 6 | ||||
-rw-r--r-- | core/src/jquery/showpassword.js | 27 | ||||
-rw-r--r-- | core/src/services/UnifiedSearchService.js | 2 | ||||
-rw-r--r-- | core/src/systemtags/systemtagsinputfield.js | 8 | ||||
-rw-r--r-- | core/src/systemtags/systemtagsmappingcollection.js | 4 |
22 files changed, 60 insertions, 61 deletions
diff --git a/core/js/tests/specs/files/clientSpec.js b/core/js/tests/specs/files/clientSpec.js index 6c15857c57d..94d52bebacf 100644 --- a/core/js/tests/specs/files/clientSpec.js +++ b/core/js/tests/specs/files/clientSpec.js @@ -50,7 +50,7 @@ describe('OC.Files.Client tests', function() { * status code * * @param {Promise} promise promise - * @param {int} status status to test + * @param {number} status status to test */ function respondAndCheckStatus(promise, status) { var successHandler = sinon.stub(); @@ -79,7 +79,7 @@ describe('OC.Files.Client tests', function() { * status code * * @param {Promise} promise promise object - * @param {int} status error status to test + * @param {number} status error status to test */ function respondAndCheckError(promise, status) { var successHandler = sinon.stub(); diff --git a/core/src/OC/admin.js b/core/src/OC/admin.js index 96ad6cd4048..3472cb2184a 100644 --- a/core/src/OC/admin.js +++ b/core/src/OC/admin.js @@ -26,7 +26,7 @@ const isAdmin = !!window._oc_isadmin /** * Returns whether the current user is an administrator * - * @return {bool} true if the user is an admin, false otherwise + * @return {boolean} true if the user is an admin, false otherwise * @since 9.0.0 */ export const isUserAdmin = () => isAdmin diff --git a/core/src/OC/capabilities.js b/core/src/OC/capabilities.js index 01405ec9b29..38d1e4eb72a 100644 --- a/core/src/OC/capabilities.js +++ b/core/src/OC/capabilities.js @@ -29,7 +29,7 @@ import { getCapabilities as realGetCapabilities } from '@nextcloud/capabilities' * * @return {Array} capabilities * - * @since 14.0 + * @since 14.0.0 */ export const getCapabilities = () => { console.warn('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities') diff --git a/core/src/OC/host.js b/core/src/OC/host.js index d525818a6ca..e4c43f5014e 100644 --- a/core/src/OC/host.js +++ b/core/src/OC/host.js @@ -34,7 +34,7 @@ export const getProtocol = () => window.location.protocol.split(':')[0] * * @return {string} host * - * @since 8.2 + * @since 8.2.0 * @deprecated 17.0.0 use window.location.host directly */ export const getHost = () => window.location.host @@ -44,7 +44,7 @@ export const getHost = () => window.location.host * The hostname is always stripped of the port * * @return {string} hostname - * @since 9.0 + * @since 9.0.0 * @deprecated 17.0.0 use window.location.hostname directly */ export const getHostName = () => window.location.hostname @@ -52,9 +52,9 @@ export const getHostName = () => window.location.hostname /** * Returns the port number used to access this Nextcloud instance * - * @return {int} port number + * @return {number} port number * - * @since 8.2 + * @since 8.2.0 * @deprecated 17.0.0 use window.location.port directly */ export const getPort = () => window.location.port diff --git a/core/src/OC/index.js b/core/src/OC/index.js index 7f811c51a56..ed0f6ce185b 100644 --- a/core/src/OC/index.js +++ b/core/src/OC/index.js @@ -153,7 +153,7 @@ export default { /** * Currently logged in user or null if none * - * @type String + * @type {string} * @deprecated use `getCurrentUser` from https://www.npmjs.com/package/@nextcloud/auth */ currentUser, @@ -307,7 +307,7 @@ export default { * Relative path to Nextcloud root. * For example: "/nextcloud" * - * @type string + * @type {string} * * @deprecated 19.0.0 use `getRootUrl` from https://www.npmjs.com/package/@nextcloud/router * @see OC#getRootPath diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js index 48dfe6c1785..9cbad9a7d44 100644 --- a/core/src/OC/l10n.js +++ b/core/src/OC/l10n.js @@ -106,8 +106,8 @@ const L10n = { * @param {object} [vars] map of placeholder key to value * @param {number} [count] number to replace %n with * @param {Array} [options] options array - * @param {bool} [options.escape=true] enable/disable auto escape of placeholders (by default enabled) - * @param {bool} [options.sanitize=true] enable/disable sanitization (by default enabled) + * @param {boolean} [options.escape=true] enable/disable auto escape of placeholders (by default enabled) + * @param {boolean} [options.sanitize=true] enable/disable sanitization (by default enabled) * @return {string} */ translate(app, text, vars, count, options) { @@ -159,7 +159,7 @@ const L10n = { * @param {number} count number to determine whether to use singular or plural * @param {object} [vars] map of placeholder key to value * @param {Array} [options] options array - * @param {bool} [options.escape=true] enable/disable auto escape of placeholders (by default enabled) + * @param {boolean} [options.escape=true] enable/disable auto escape of placeholders (by default enabled) * @return {string} Translated string */ translatePlural(app, textSingular, textPlural, count, vars, options) { diff --git a/core/src/OC/menu.js b/core/src/OC/menu.js index 669b1f1566b..9522650c472 100644 --- a/core/src/OC/menu.js +++ b/core/src/OC/menu.js @@ -37,7 +37,7 @@ export let currentMenuToggle = null * @param {jQuery} $menuEl the menu container element * @param {Function | undefined} toggle callback invoked everytime the menu is opened * @param {boolean} headerMenu is this a top right header menu? - * @return {undefined} + * @return {void} */ export const registerMenu = function($toggle, $menuEl, toggle, headerMenu) { $menuEl.addClass('menu') diff --git a/core/src/OC/notification.js b/core/src/OC/notification.js index 02383af81df..74499d5241b 100644 --- a/core/src/OC/notification.js +++ b/core/src/OC/notification.js @@ -97,7 +97,7 @@ export default { * @param {string} html Message to display * @param {object} [options] options * @param {string} [options.type] notification type - * @param {int} [options.timeout=0] timeout value, defaults to 0 (permanent) + * @param {number} [options.timeout=0] timeout value, defaults to 0 (permanent) * @return {jQuery} jQuery element for notification row * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ @@ -116,7 +116,7 @@ export default { * @param {string} text Message to display * @param {object} [options] options * @param {string} [options.type] notification type - * @param {int} [options.timeout=0] timeout value, defaults to 0 (permanent) + * @param {number} [options.timeout=0] timeout value, defaults to 0 (permanent) * @return {jQuery} jQuery element for notification row * @deprecated 17.0.0 use the `@nextcloud/dialogs` package */ @@ -159,7 +159,7 @@ export default { * * @param {string} text Message to show * @param {Array} [options] options array - * @param {int} [options.timeout=7] timeout in seconds, if this is 0 it will show the message permanently + * @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<any>} the toast element diff --git a/core/src/OC/plugins.js b/core/src/OC/plugins.js index 6be76a2d5a4..b9221481aa5 100644 --- a/core/src/OC/plugins.js +++ b/core/src/OC/plugins.js @@ -24,7 +24,7 @@ export default { /** - * @type Array.<OC.Plugin> + * @type {Array.<OC.Plugin>} */ _plugins: {}, diff --git a/core/src/OC/util.js b/core/src/OC/util.js index e3e3e2a3171..463fd937eca 100644 --- a/core/src/OC/util.js +++ b/core/src/OC/util.js @@ -148,7 +148,7 @@ export default { /** * Returns the width of a generic browser scrollbar * - * @return {int} width of scrollbar + * @return {number} width of scrollbar */ getScrollBarWidth() { if (this._scrollBarWidth) { @@ -230,7 +230,7 @@ export default { * Calls the callback in a given interval until it returns true * * @param {Function} callback function to call on success - * @param {integer} interval in milliseconds + * @param {number} interval in milliseconds */ waitFor(callback, interval) { const internalCallback = function() { diff --git a/core/src/OCP/collaboration.js b/core/src/OCP/collaboration.js index 129440033e3..aae0c943f37 100644 --- a/core/src/OCP/collaboration.js +++ b/core/src/OCP/collaboration.js @@ -25,7 +25,7 @@ import escapeHTML from 'escape-html' /** * @typedef TypeDefinition - * @function {callback} action This action is executed to let the user select a resource + * @function {Function} action This action is executed to let the user select a resource * @param {string} icon Contains the icon css class for the type * @function Object() { [native code] } */ diff --git a/core/src/OCP/comments.js b/core/src/OCP/comments.js index 9f30557d231..0817302c067 100644 --- a/core/src/OCP/comments.js +++ b/core/src/OCP/comments.js @@ -26,7 +26,7 @@ import $ from 'jquery' /* * Detects links: * Either the http(s) protocol is given or two strings, basically limited to ascii with the last - * word being at least one digit long, + * word being at least one digit long, * followed by at least another character * * The downside: anything not ascii is excluded. Not sure how common it is in areas using different diff --git a/core/src/files/client.js b/core/src/files/client.js index 679457e38cf..9c39096ac69 100644 --- a/core/src/files/client.js +++ b/core/src/files/client.js @@ -42,7 +42,7 @@ import escapeHTML from 'escape-html' * * @param {Object} options * @param {String} options.host host name - * @param {int} [options.port] port + * @param {number} [options.port] port * @param {boolean} [options.useHTTPS] whether to use https * @param {String} [options.root] root path * @param {String} [options.userName] user name @@ -449,7 +449,7 @@ import escapeHTML from 'escape-html' /** * Returns whether the given status code means success * - * @param {int} status status code + * @param {number} status status code * * @returns true if status code is between 200 and 299 included */ @@ -546,7 +546,7 @@ import escapeHTML from 'escape-html' * * @param {Object} filter filter criteria * @param {Object} [filter.systemTagIds] list of system tag ids to filter by - * @param {bool} [filter.favorite] set it to filter by favorites + * @param {boolean} [filter.favorite] set it to filter by favorites * @param {Object} [options] options * @param {Array} [options.properties] list of Webdav properties to retrieve * @@ -698,7 +698,7 @@ import escapeHTML from 'escape-html' * @param {String} body file body * @param {Object} [options] * @param {String} [options.contentType='text/plain'] content type - * @param {bool} [options.overwrite=true] whether to overwrite an existing file + * @param {boolean} [options.overwrite=true] whether to overwrite an existing file * * @returns {Promise} */ diff --git a/core/src/globals.js b/core/src/globals.js index 45a2fba3dd4..9c8f305f39a 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -69,7 +69,7 @@ const warnIfNotTesting = function() { * * @param {Function} func the library to deprecate * @param {string} funcName the name of the library - * @param {Int} version the version this gets removed + * @param {number} version the version this gets removed * @return {Function} */ const deprecate = (func, funcName, version) => { diff --git a/core/src/jquery/exists.js b/core/src/jquery/exists.js index 4006982a8b6..0cd0cb0053c 100644 --- a/core/src/jquery/exists.js +++ b/core/src/jquery/exists.js @@ -27,7 +27,7 @@ import $ from 'jquery' * check if an element exists. * allows you to write if ($('#myid').exists()) to increase readability * - * @link http://stackoverflow.com/questions/31044/is-there-an-exists-function-for-jquery + * @see {@link http://stackoverflow.com/questions/31044/is-there-an-exists-function-for-jquery} * @return {boolean} */ $.fn.exists = function() { diff --git a/core/src/jquery/filterattr.js b/core/src/jquery/filterattr.js index fb8d45c4dd3..f6b4d8063d3 100644 --- a/core/src/jquery/filterattr.js +++ b/core/src/jquery/filterattr.js @@ -28,7 +28,7 @@ import $ from 'jquery' * * @param {string} attrName attribute name * @param {string} attrValue attribute value - * @return {Void} + * @return {void} */ $.fn.filterAttr = function(attrName, attrValue) { return this.filter(function() { diff --git a/core/src/jquery/octemplate.js b/core/src/jquery/octemplate.js index 9e060881e21..fb818f5ac7c 100644 --- a/core/src/jquery/octemplate.js +++ b/core/src/jquery/octemplate.js @@ -65,14 +65,14 @@ import escapeHTML from 'escape-html' * var contacts = // fetched in some ajax call * * $.each(contacts, function(idx, contact) { - * $contactList.append( - * $tmpl.octemplate({ - * id: contact.getId(), - * name: contact.getDisplayName(), - * email: contact.getPreferredEmail(), - * phone: contact.getPreferredPhone(), - * }); - * ); + * $contactList.append( + * $tmpl.octemplate({ + * id: contact.getId(), + * name: contact.getDisplayName(), + * email: contact.getPreferredEmail(), + * phone: contact.getPreferredPhone(), + * }); + * ); * }); */ /** diff --git a/core/src/jquery/selectrange.js b/core/src/jquery/selectrange.js index b8f0d3dc122..f110bdbc501 100644 --- a/core/src/jquery/selectrange.js +++ b/core/src/jquery/selectrange.js @@ -27,9 +27,9 @@ import $ from 'jquery' * select a range in an input field * * @link http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area - * @param {int} start start selection from - * @param {int} end number of char from start - * @return {Void} + * @param {number} start start selection from + * @param {number} end number of char from start + * @return {void} */ $.fn.selectRange = function(start, end) { return this.each(function() { diff --git a/core/src/jquery/showpassword.js b/core/src/jquery/showpassword.js index 3423ea5fc17..2681619efad 100644 --- a/core/src/jquery/showpassword.js +++ b/core/src/jquery/showpassword.js @@ -23,20 +23,19 @@ import $ from 'jquery' -/* -* @name Show Password -* @description -* @version 1.3 -* @requires Jquery 1.5 -* -* @author Jan Jarfalk -* @author-email jan.jarfalk@unwrongest.com -* @author-website http://www.unwrongest.com -* -* @special-thanks Michel Gratton -* -* @licens MIT License - http://www.opensource.org/licenses/mit-license.php -*/ +/** + * @name Show Password + * @description + * @version 1.3.0 + * @requires Jquery 1.5 + * + * @author Jan Jarfalk <jan.jarfalk@unwrongest.com> + * author-website http://www.unwrongest.com + * + * special-thanks Michel Gratton + * + * @license MIT + */ $.fn.extend({ showPassword(c) { diff --git a/core/src/services/UnifiedSearchService.js b/core/src/services/UnifiedSearchService.js index 1c2b5d617c8..dde36899869 100644 --- a/core/src/services/UnifiedSearchService.js +++ b/core/src/services/UnifiedSearchService.js @@ -68,7 +68,7 @@ export async function getTypes() { * @param {object} options destructuring object * @param {string} options.type the type to search * @param {string} options.query the search - * @param {int|string|undefined} options.cursor the offset for paginated searches + * @param {number|string|undefined} options.cursor the offset for paginated searches * @return {object} {request: Promise, cancel: Promise} */ export function search({ type, query, cursor }) { diff --git a/core/src/systemtags/systemtagsinputfield.js b/core/src/systemtags/systemtagsinputfield.js index f0aac9381d6..f9470c0e54e 100644 --- a/core/src/systemtags/systemtagsinputfield.js +++ b/core/src/systemtags/systemtagsinputfield.js @@ -57,10 +57,10 @@ import templateSelection from './templates/selection.handlebars' * * @param {Object} [options] * @param {string} [options.objectType=files] object type for which tags are assigned to - * @param {bool} [options.multiple=false] whether to allow selecting multiple tags - * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown - * @param {bool} [options.allowCreate=true] whether new tags can be created - * @param {bool} [options.isAdmin=true] whether the user is an administrator + * @param {boolean} [options.multiple=false] whether to allow selecting multiple tags + * @param {boolean} [options.allowActions=true] whether tags can be renamed/delete within the dropdown + * @param {boolean} [options.allowCreate=true] whether new tags can be created + * @param {boolean} [options.isAdmin=true] whether the user is an administrator * @param {Function} options.initSelection function to convert selection to data */ initialize: function(options) { diff --git a/core/src/systemtags/systemtagsmappingcollection.js b/core/src/systemtags/systemtagsmappingcollection.js index f47b6a81ec2..61186ec0c4d 100644 --- a/core/src/systemtags/systemtagsmappingcollection.js +++ b/core/src/systemtags/systemtagsmappingcollection.js @@ -65,7 +65,7 @@ import { generateRemoteUrl } from '@nextcloud/router' /** * Sets the object id to filter by or null for all. * - * @param {int} objectId file id or null + * @param {number} objectId file id or null */ setObjectId(objectId) { this._objectId = objectId @@ -74,7 +74,7 @@ import { generateRemoteUrl } from '@nextcloud/router' /** * Sets the object type to filter by or null for all. * - * @param {int} objectType file id or null + * @param {number} objectType file id or null */ setObjectType(objectType) { this._objectType = objectType |