All Downloads are FREE. Search and download functionalities are using the official Maven repository.

handlebars.javascript.partial_model_enum_class.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.54
Show newest version
{{#emitJSDoc}}
  /**
   * Enum class {{classname}}.
   * @enum {{braces "left"}}{{dataType}}{{braces "right"}}
   * @readonly
   */
{{/emitJSDoc}}
  var exports = {
{{#allowableValues}}
  {{#enumVars}}
    {{#emitJSDoc}}
    /**
     * value: {{{value}}}
     * @const
     */
    {{/emitJSDoc}}
    {{name}}: {{{value}}}{{^@last}},

{{/@last}}
  {{/enumVars}}
{{/allowableValues}}

  };

{{#emitJSDoc}}
  /**
   * Returns a {{classname}} enum value from a JavaScript object name.
   * @param {Object} data The plain JavaScript object containing the name of the enum value.
   * @return {module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}{{braces "right"}} The enum {{classname}} value.
   */
{{/emitJSDoc}}
  exports.constructFromObject = function(object) {
    return object;
  }

  return exports;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy