swc/bundler/tests/.cache/untrusted/a500708b93b799b1227b43a1db7466f01b45acc7.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +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;
}
}
}