// 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 Password = string & { readonly __brand: "Password" };

export const Password = {
  of(value: string): Result<Password, ValidationError> {
    if (!(value.length >= 8)) {
      return Err({ field: "Password", message: "length must be at least 8", value });
    }
    return Ok(value as Password);
  },
  unsafe(value: string): Password {
    return value as Password;
  },
};

