export default class Invalid {
    constructor(reason, explanation) {
        this.reason = reason;
        this.explanation = explanation;
    }
    toMessage() {
        if (this.explanation) {
            return `${this.reason}: ${this.explanation}`;
        }
        else {
            return this.reason;
        }
    }
}
//# sourceMappingURL=invalid.js.map