swc/bundler/tests/.cache/untrusted/a500708b93b799b1227b43a1db7466f01b45acc7.ts

18 lines
350 B
TypeScript
Raw Normal View History

// Loaded from https://unpkg.com/luxon@1.25.0/src/impl/invalid.js
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;
}
}
}