Skip to content

Commit abb9a4a

Browse files
committed
Build/Test Tools: Add accordion.js to TypeScript checking.
Include `accordion.js` in `tsconfig.json` and document the `accordionSwitch()` parameter as `JQuery` to match its callers and use of jQuery methods. This adds static checking without changing runtime behavior. Developed in: #14041 Props rahultank. See #65997. git-svn-id: https://develop.svn.wordpress.org/trunk@64297 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4d5d152 commit abb9a4a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/js/_enqueues/lib/accordion.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
/**
5252
* Close the current accordion section and open a new one.
5353
*
54-
* @param {Object} el Title element of the accordion section to toggle.
54+
* @param {JQuery} el Title element of the accordion section to toggle.
5555
* @since 3.6.0
5656
*/
5757
function accordionSwitch ( el ) {

‎tsconfig.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
"include": [],
3232
"files": [
33+
"src/js/_enqueues/lib/accordion.js",
3334
"src/js/_enqueues/lib/codemirror/htmlhint-kses.js",
3435
"src/js/_enqueues/lib/codemirror/javascript-lint.js",
3536
"src/js/_enqueues/lib/emoji-loader.js",

0 commit comments

Comments
 (0)