/** * Copyright 2018 Colin Doig. Distributed under the MIT license. */ import Enum from '../../Enum'; export default class Status extends Enum { public static SUCCESS: string = 'SUCCESS'; constructor(value: string = '') { super(); this.setValue(value); } public setValue(value: string): void { if (value) { if (value !== 'SUCCESS') { throw new Error(`Invalid Status: ${value}`); } this.value = value; this.valid = true; } } }