Use of implicitly declared global variable

 

https://stackoverflow.com/questions/7604419/resharper-javascript-use-of-implicitly-declared-global-variable-x/8132307

https://github.com/taye/interact.js/issues/233

 

Assume you have two global variables, and the name of variable is confirmTranslation and selectAllTranslation, these variables are definite in ascx(Asp.Net) file.

<script>
        var selectAllTranslation = "";
        var urlGetPageTranslation = '';
 </script>

And you use these global variable in another js file, such as test.js.

Then you need add following code at the top of that JavaScript file

/* global confirmTranslation, selectAllTranslation */

 

posted @ 2018-07-12 19:05  ChuckLu  阅读(705)  评论(0编辑  收藏  举报