swc/crates/swc_bundler/tests/.cache/untrusted/a500708b93b799b1227b43a1db7466f01b45acc7.ts
2021-11-09 20:42:49 +09:00

18 lines
350 B
TypeScript

// 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;
}
}
}