小编pim*_*ing的帖子

什么是JSC_MULTIPLE_VAR_DEF?

我花了半个小时找到这个问题的答案.将它和答案一起发布在这里,希望能节省半个小时.

编译此代码时

"use strict";
/**
 * These are the flower and the instrument used in the code below.
 */
var flower, instrument;
Run Code Online (Sandbox Code Playgroud)

Closure Compiler给了我们这个警告

JSC_MULTIPLE_VAR_DEF: declaration of multiple variables with shared type information at line 6 character 0
var flower, instrument;
^
Run Code Online (Sandbox Code Playgroud)

这个含糊的警告意味着什么?

javascript google-closure-compiler

2
推荐指数
1
解决办法
452
查看次数