Make WordPress Core

Changeset 64297


Ignore:
Timestamp:
10/11/2026 07:13:12 AM (9 days ago)
Author:
lancewillett
Message:

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: ​https://github.com/WordPress/wordpress-develop/pull/14041

Props rahultank.
See #65997.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/accordion.js

    r63600 r64297  
    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         */
  • trunk/tsconfig.json

    r64249 r64297  
    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",
Note: See TracChangeset for help on using the changeset viewer.