Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

Text · 11 lines · 352 B · at 74947de

// saveConfig returns a Result; calling it as a statement drops the failure.import { Ok, Err, type Result } from "@tsus/runtime";const saveConfig = (body: string): Result<true, "empty config"> => (body === "" ? Err("empty config") : Ok(true));const run = (body: string): string => {  saveConfig(body);  return "saved";};console.log(run(""));