Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

Text · 17 lines · 474 B · at f30ac63

import { type Option, type Result } from "@tsus/runtime";export type Level = "DEBUG" | "INFO" | "WARN" | "ERROR";export type LogLine = {  timestamp: string;  level: Level;  module: Option<string>;  message: string;  fields: Record<string, string>;};export type LogParseError = { kind: "empty_line" } | { kind: "bad_timestamp" } | { kind: "bad_level"; level: string };export const parseLogLine = (line: string): Result<LogLine, LogParseError> => {  // TODO};