export interface IOrReplaceState { _orReplaceValue?: "ABORT" | "FAIL" | "IGNORE" | "REPLACE" | "ROLLBACK"; orAbort: typeof orAbort; orFail: typeof orFail; orIgnore: typeof orIgnore; orReplace: typeof orReplace; orRollback: typeof orRollback; } export function orAbort(this: T): T { return { ...this, _orReplaceValue: "ABORT" }; } export function orFail(this: T): T { return { ...this, _orReplaceValue: "FAIL" }; } export function orIgnore(this: T): T { return { ...this, _orReplaceValue: "IGNORE" }; } export function orReplace(this: T): T { return { ...this, _orReplaceValue: "REPLACE" }; } export function orRollback(this: T): T { return { ...this, _orReplaceValue: "ROLLBACK" }; }