Skip to content

Instantly share code, notes, and snippets.

@fkling
Created August 12, 2013 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fkling/6213239 to your computer and use it in GitHub Desktop.
Save fkling/6213239 to your computer and use it in GitHub Desktop.
Closuer compiler enum example.
// ==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