arktypea
arktype10mo ago
schmime

Is there a better way to write this?

import { type } from "arktype";

export const nonEmptyStringOrNull = type("string | null | undefined").pipe(s => !s ? null : s);
Was this page helpful?