UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

18 lines (17 loc) 445 B
export default class JDLEnumValue { name; value; comment; constructor(name, value, comment) { if (!name) { throw new Error('The enum value name has to be passed to create an enum.'); } this.name = name; this.value = value; this.comment = comment; } toString() { const value = this.value ? ` (${this.value})` : ''; return `${this.name}${value}`; } }