How can I rewrite this code to avoid TypeScript error:
const level: "debug" | "info" | "warn" | "error" | "custom