squiggle/packages/squiggle-lang/src/js/SqError.ts
2022-08-30 15:16:57 +04:00

18 lines
440 B
TypeScript

import * as RSErrorValue from "../rescript/ForTS/ForTS_Reducer_ErrorValue.gen";
export class SqError {
constructor(private _value: RSErrorValue.reducerErrorValue) {}
toString() {
return RSErrorValue.toString(this._value);
}
static createTodoError(v: string) {
return new SqError(RSErrorValue.createTodoError(v));
}
static createOtherError(v: string) {
return new SqError(RSErrorValue.createOtherError(v));
}
}