-
-
Save chrisdone/1188422 to your computer and use it in GitHub Desktop.
closure test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testcase.js | |
/* | |
* Demo func | |
* @param {yes:function()} config | |
*/ | |
function foo(config){ | |
if(config.yes()){ | |
return true; | |
} else { | |
return false; | |
} | |
} | |
testcase: | |
java -jar /home/chris/JavaScript/closure-compiler/compiler.jar \ | |
--jscomp_dev_mode EVERY_PASS \ | |
--warning_level VERBOSE \ | |
--compilation_level ADVANCED_OPTIMIZATIONS \ | |
--jscomp_error checkTypes \ | |
--js_output_file /dev/null \ | |
--js testcase.js \ | |
$ sh testcase | |
testcase.js:6: ERROR - Property yes never defined on config | |
if(config.yes()){ | |
^ | |
1 error(s), 0 warning(s), 57.1% typed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment