mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 06:36:08 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
18 lines
350 B
TypeScript
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;
|
|
}
|
|
}
|
|
}
|