Is there a way to support intellisense for Wordpress localization in javascript using the localization hook and localization array?
In WordPress, there is a way to use localization in client-side javascript files. To achieve this we need to pass a multidimensional PHP array into the 'wp_localize_script' along with the script-handle and the localized-js-object name. The script-handle refers to a js file and in the js file, we can access the localized-js-object and its properties. But now there is no IntelliSense support for the localized-js-object in the corresponding file.
For example:
wp_localize_script( 'a07_book_review_rate_script', 'book_review_info', [
'post_id' => get_the_ID(),
'user_id' => get_current_user_id(),
'user_ip' => $this->get_user_ip(),
'action' => 'a07_rating_save',
'a07_r_nonce' => wp_create_nonce( 'a07_rating_save_act' ),
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
] );
in the above code snippect, we have localized a script with handle 'a07_book_review_rate_script' and in client-side the script will be able to reference `book_review_info` object access the properties like 'ajaxUrl' as book_review_info['ajaxUrl']. but in the script we don't have any intelligence as the following screenshot shows:

is there a way to enable support for this type of intelligence in PHPStorm?
Please sign in to leave a comment.
Unfortunately, there's no way to achieve that at the moment.
Could you please submit this as a feature request to our tracker?
https://youtrack.jetbrains.com/newIssue?project=WI
Thank you so much.