Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

Text · 7 lines · 321 B · at dc221d2

import { fromNullable } from "@tsus/runtime/boundary";import { type Option, type Result } from "@tsus/runtime";import { getRow } from "./store.ts";import { validateRow, type Row } from "./validate.tsus";export const loadRow = (id: number): Option<Result<Row, string>> =>  fromNullable(getRow(id)).map(validateRow);