Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

Text · 14 lines · 328 B · at 9472e3c

import { loadRow } from "./repo.tsus";const show = (id: number): string =>  match (loadRow(id)) {    Some(validated) => match (validated) {      Ok(row) => `${row.name} (${row.age})`,      Err(e) => `bad data: ${e}`,    },    None => "not found",  };console.log(show(1));console.log(show(2));console.log(show(99));