diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/js/code-editor.js --- a/wp/wp-admin/js/code-editor.js Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/js/code-editor.js Mon Oct 14 18:28:13 2019 +0200 @@ -1,7 +1,17 @@ +/** + * @output wp-admin/js/code-editor.js + */ + if ( 'undefined' === typeof window.wp ) { + /** + * @namespace wp + */ window.wp = {}; } if ( 'undefined' === typeof window.wp.codeEditor ) { + /** + * @namespace wp.codeEditor + */ window.wp.codeEditor = {}; } @@ -33,6 +43,7 @@ * @param {object} settings.codeMirror - Settings for CodeMirror. * @param {Function} settings.onChangeLintingErrors - Callback for when there are changes to linting errors. * @param {Function} settings.onUpdateErrorNotice - Callback to update error notice. + * * @returns {void} */ function configureLinting( editor, settings ) { // eslint-disable-line complexity @@ -202,6 +213,7 @@ * @param {object} settings.codeMirror - Settings for CodeMirror. * @param {Function} settings.onTabNext - Callback to handle tabbing to the next tabbable element. * @param {Function} settings.onTabPrevious - Callback to handle tabbing to the previous tabbable element. + * * @returns {void} */ function configureTabbing( codemirror, settings ) { @@ -240,7 +252,7 @@ } /** - * @typedef {object} CodeEditorInstance + * @typedef {object} wp.codeEditor~CodeEditorInstance * @property {object} settings - The code editor settings. * @property {CodeMirror} codemirror - The CodeMirror instance. */ @@ -260,6 +272,7 @@ * @param {object} [settings.csslint] - Rules for CSSLint. * @param {object} [settings.htmlhint] - Rules for HTMLHint. * @param {object} [settings.jshint] - Rules for JSHint. + * * @returns {CodeEditorInstance} Instance. */ wp.codeEditor.initialize = function initialize( textarea, settings ) {