diff --git a/resources/dist/index.js.map.json b/resources/dist/index.js.map.json index 752c937f0..d4c41dea7 100644 Binary files a/resources/dist/index.js.map.json and b/resources/dist/index.js.map.json differ diff --git a/src/actions.js b/src/actions.js index 1b08288a1..7825f8b5a 100644 --- a/src/actions.js +++ b/src/actions.js @@ -36,7 +36,7 @@ function timedAction( baseAction ) { * * @param {Object} initiallyEnabled Allows to disable individual popup types while still showing the * footer link - * @param {mw.user} user + * @param {mw.User} user * @param {ext.popups.UserSettings} userSettings * @param {mw.Map} config The config of the MediaWiki client-side application, * i.e. `mw.config` diff --git a/src/changeListener.js b/src/changeListener.js index 6a89cb33f..efa07bbdf 100644 --- a/src/changeListener.js +++ b/src/changeListener.js @@ -22,7 +22,6 @@ * * @param {Redux.Store} store * @param {ext.popups.ChangeListener} callback - * @return {void} */ export default function registerChangeListener( store, callback ) { // This function is based on the example in [the documentation for diff --git a/src/changeListeners/linkTitle.js b/src/changeListeners/linkTitle.js index 2d5bad775..46133ac3d 100644 --- a/src/changeListeners/linkTitle.js +++ b/src/changeListeners/linkTitle.js @@ -14,7 +14,7 @@ export default function linkTitle() { * Destroys the title attribute of the element, storing its value in local * state so that it can be restored later (see `restoreTitleAttr`). * - * @param {Element|undefined} el + * @param {HTMLElement|undefined} el */ function destroyTitleAttr( el ) { // Has the user dwelled on a link? If we've already removed its title attribute, then NOOP. @@ -27,7 +27,7 @@ export default function linkTitle() { /** * Restores the title attribute of the element. * - * @param {Element|undefined} el + * @param {HTMLElement|undefined} el */ function restoreTitleAttr( el ) { // Avoid overwriting a non-empty title with an empty one, just to be sure diff --git a/src/changeListeners/syncUserSettings.js b/src/changeListeners/syncUserSettings.js index fe6cf67a1..aa2806a95 100644 --- a/src/changeListeners/syncUserSettings.js +++ b/src/changeListeners/syncUserSettings.js @@ -57,7 +57,6 @@ function get( state, path ) { * @param {string} path dot-separated path in the state tree * @param {Function} sync function to be called with the newest value if * changed - * @return {void} */ function syncIfChanged( oldState, newState, path, sync ) { const current = get( newState, path ); diff --git a/src/container.js b/src/container.js index bffdc7f80..60b493f3c 100644 --- a/src/container.js +++ b/src/container.js @@ -25,7 +25,6 @@ export default function createContainer() { * @name Container#set * @param {string} name * @param {*} factory - * @return {void} */ set( name, factory ) { factories[ name ] = factory; diff --git a/src/index.js b/src/index.js index e6a3b6d56..e2ea80444 100644 --- a/src/index.js +++ b/src/index.js @@ -107,7 +107,6 @@ function getPageviewTracker( config ) { * @param {PreviewBehavior} previewBehavior * @param {EventTracker} statsvTracker * @param {EventTracker} pageviewTracker - * @return {void} */ function registerChangeListeners( store, registerActions, userSettings, settingsDialog, previewBehavior, diff --git a/src/instrumentation/statsv.js b/src/instrumentation/statsv.js index d7e7df4d1..dc4ca5e69 100644 --- a/src/instrumentation/statsv.js +++ b/src/instrumentation/statsv.js @@ -9,7 +9,7 @@ * * [0]: https://wikitech.wikimedia.org/wiki/Graphite#statsv * - * @param {mw.user} user The `mw.user` singleton instance + * @param {mw.User} user The `mw.user` singleton instance * @param {mw.Map} config The `mw.config` singleton instance * @param {Experiments} experiments * @return {boolean} diff --git a/src/isPagePreviewsEnabled.js b/src/isPagePreviewsEnabled.js index b751b1b21..7e2cb3936 100644 --- a/src/isPagePreviewsEnabled.js +++ b/src/isPagePreviewsEnabled.js @@ -13,7 +13,7 @@ const canSaveToUserPreferences = require( './canSaveToUserPreferences.js' ); * either be logged in and have enabled the preference or be logged out and have * not disabled previews via the settings modal. * - * @param {mw.user} user The `mw.user` singleton instance + * @param {mw.User} user The `mw.user` singleton instance * @param {Object} userSettings An object returned by `userSettings.js` * @param {mw.Map} config * diff --git a/src/isReferencePreviewsEnabled.js b/src/isReferencePreviewsEnabled.js index c2718216f..ef5021c7b 100644 --- a/src/isReferencePreviewsEnabled.js +++ b/src/isReferencePreviewsEnabled.js @@ -7,7 +7,7 @@ const canSaveToUserPreferences = require( './canSaveToUserPreferences.js' ); * Given the global state of the application, creates a function that gets * whether or not the user should have Reference Previews enabled. * - * @param {mw.user} user The `mw.user` singleton instance + * @param {mw.User} user The `mw.user` singleton instance * @param {Object} userSettings An object returned by `userSettings.js` * @param {mw.Map} config * diff --git a/src/preview/model.js b/src/preview/model.js index b37c6a5b4..50da7b863 100644 --- a/src/preview/model.js +++ b/src/preview/model.js @@ -110,7 +110,7 @@ export function createNullModel( title, url ) { } /** - * @param {Element} element + * @param {HTMLElement} element * @param {string} selector * @return {boolean} */ @@ -121,8 +121,8 @@ const elementMatchesSelector = ( element, selector ) => { /** * Recursively checks the element and its parents. * - * @param {Element} element - * @return {Element|null} + * @param {HTMLElement} element + * @return {HTMLElement|null} */ export function findNearestEligibleTarget( element ) { const selector = selectors.join( ', ' ); diff --git a/src/ui/renderer.js b/src/ui/renderer.js index 7ae18f912..48ff1e93d 100644 --- a/src/ui/renderer.js +++ b/src/ui/renderer.js @@ -48,7 +48,6 @@ export { pointerSize, landscapePopupWidth, portraitPopupWidth }; // for use in s * * @private * @param {Object} container DOM object to which pointer masks are appended - * @return {void} */ export function createPointerMasks( container ) { const node = document.createElement( 'div' ); @@ -60,7 +59,6 @@ export function createPointerMasks( container ) { /** * Initializes the renderer. * - * @return {void} */ export function init() { if ( !supportsCSSClipPath() ) { @@ -75,7 +73,7 @@ export function init() { * TODO: Rename `isTall` to `isPortrait`. * * @typedef {Object} ext.popups.Preview - * @property {JQuery} el + * @property {jQuery} el * @property {boolean} hasThumbnail * @property {Object} thumbnail * @property {boolean} isTall Sugar around @@ -312,7 +310,6 @@ export function show( * * @param {ext.popups.Preview} preview * @param {ext.popups.PreviewBehavior} behavior - * @return {void} */ export function bindBehavior( preview, behavior ) { preview.el.addEventListener( 'mouseenter', behavior.previewDwell ); @@ -535,7 +532,6 @@ export function getClasses( preview, layout ) { * @param {number} predefinedLandscapeImageHeight landscape image height * @param {number} pointerSpaceSize * @param {number} windowHeight - * @return {void} */ export function layoutPreview( preview, layout, classes, predefinedLandscapeImageHeight, pointerSpaceSize, windowHeight @@ -588,7 +584,6 @@ export function layoutPreview( * * @param {ext.popups.Preview} preview * @param {ext.popups.PreviewLayout} layout - * @return {void} */ export function setThumbnailClipPath( { el, isTall, thumbnail }, { flippedY, flippedX, dir } diff --git a/src/ui/templates/pagePreview/pagePreview.js b/src/ui/templates/pagePreview/pagePreview.js index f9c3fce41..cd39f51ce 100644 --- a/src/ui/templates/pagePreview/pagePreview.js +++ b/src/ui/templates/pagePreview/pagePreview.js @@ -24,7 +24,7 @@ const templateHTML = ` * @param {ext.popups.Thumbnail|null} thumbnail * @param {boolean} withCSSClipPath * @param {string} linkTitle - * @return {Element} + * @return {HTMLElement} */ export function renderPagePreview( model, thumbnail, withCSSClipPath, linkTitle diff --git a/src/ui/templates/popup/popup.js b/src/ui/templates/popup/popup.js index b9711f0a8..1ea1d65c7 100644 --- a/src/ui/templates/popup/popup.js +++ b/src/ui/templates/popup/popup.js @@ -9,8 +9,8 @@ const templateHTML = ` `; /** * @param {ext.popups.previewTypes} type - * @param {Element} element The contents of the popup. - * @return {Element} + * @param {HTMLElement} element The contents of the popup. + * @return {HTMLElement} */ export function renderPopup( type, container ) { diff --git a/src/ui/templates/preview/preview.js b/src/ui/templates/preview/preview.js index 1f5ab2616..cb89b53b8 100644 --- a/src/ui/templates/preview/preview.js +++ b/src/ui/templates/preview/preview.js @@ -27,7 +27,7 @@ const templateHTML = ` * @param {ext.popups.PagePreviewModel} model * @param {string|null} message * @param {string} linkMsg - * @return {JQuery} + * @return {jQuery} */ export function renderPreview( model, message, linkMsg diff --git a/src/ui/templates/referencePreview/referencePreview.js b/src/ui/templates/referencePreview/referencePreview.js index add2596b6..54ed631fe 100644 --- a/src/ui/templates/referencePreview/referencePreview.js +++ b/src/ui/templates/referencePreview/referencePreview.js @@ -37,7 +37,7 @@ const replaceWith = ( node, htmlOrOtherNode ) => { /** * @param {ext.popups.ReferencePreviewModel} model - * @return {JQuery} + * @return {jQuery} */ export function renderReferencePreview( model diff --git a/src/ui/templates/settingsDialog/settingsDialog.js b/src/ui/templates/settingsDialog/settingsDialog.js index c9998c398..b72880a60 100644 --- a/src/ui/templates/settingsDialog/settingsDialog.js +++ b/src/ui/templates/settingsDialog/settingsDialog.js @@ -44,7 +44,7 @@ function escapeChoices( choices = [] ) { /** * @param {SettingsModel} model - * @return {Element} + * @return {HTMLElement} */ export function renderSettingsDialog( model ) { const heading = escapeHTML( model.heading ), diff --git a/src/ui/templates/templateUtil.js b/src/ui/templates/templateUtil.js index 05d1c5bf4..17fe560e2 100644 --- a/src/ui/templates/templateUtil.js +++ b/src/ui/templates/templateUtil.js @@ -13,7 +13,7 @@ export function escapeHTML( str ) { const templates = {}; /** * @param {string} html markup of the template - * @return {Element} a cloned root element of the template + * @return {HTMLElement} a cloned root element of the template */ export function createNodeFromTemplate( html ) { if ( !templates[ html ] ) { diff --git a/src/ui/thumbnail.js b/src/ui/thumbnail.js index 3a72a54ae..e007c8158 100644 --- a/src/ui/thumbnail.js +++ b/src/ui/thumbnail.js @@ -17,7 +17,7 @@ export const SIZES = { /** * @typedef {Object} ext.popups.Thumbnail - * @property {JQuery} el + * @property {jQuery} el * @property {boolean} isTall Whether or not the thumbnail is portrait * @property {number} width * @property {number} height diff --git a/tests/node-qunit/actions.test.js b/tests/node-qunit/actions.test.js index c406941a9..08f90a628 100644 --- a/tests/node-qunit/actions.test.js +++ b/tests/node-qunit/actions.test.js @@ -65,7 +65,6 @@ QUnit.test( '#boot', ( assert ) => { * of the module. * * @param {Object} module - * @return {void} */ function setupWait( module ) { module.waitPromise = $.Deferred().resolve().promise( { abort() {} } ); @@ -79,7 +78,6 @@ function setupWait( module ) { * creator. * * @param {Object} module - * @return {void} */ function setupEl( module ) { module.title = TEST_TITLE;