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

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

export type Yv = number & { readonly __brand: "Yv" };

export const Yv = {
  of(value: number): Result<Yv, ValidationError> {
    if (!Number.isInteger(value)) {
      return Err({ field: "Yv", message: "must be an integer", value });
    }
    if (!(value > 0)) {
      return Err({ field: "Yv", message: "must be positive", value });
    }
    return Ok(value as Yv);
  },
  unsafe(value: number): Yv {
    return value as Yv;
  },
};

