Created
August 12, 2013 17:49
-
-
Save fkling/6213239 to your computer and use it in GitHub Desktop.
Closuer compiler enum example.
This file contains hidden or 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
// ==ClosureCompiler== | |
// @compilation_level ADVANCED_OPTIMIZATIONS | |
// @output_file_name default.js | |
// ==/ClosureCompiler== | |
/** | |
* @enum {number} | |
*/ | |
MyNamespace.MyEnum = { | |
FOO: 1, | |
BAR: 2, | |
BAZ: 3 | |
} | |
/** | |
* @type {MyNamespace.MyEnum} | |
*/ | |
window.foo = MyNamespace.MyEnum.FOO; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment