// Generated by bynkc — do not edit by hand.
// commons demo

import { Ok, Err, Some, None, type Result, type Option, type ValidationError } from "./runtime.js";

export type Name = string & { readonly __brand: "Name" };

export const Name = {
  of(value: string): Result<Name, ValidationError> {
    if (!(value.length > 0)) {
      return Err({ field: "Name", message: "must be non-empty", value });
    }
    return Ok(value as Name);
  },
  unsafe(value: string): Name {
    return value as Name;
  },
};

