Cotal TypeScript packages
    Preparing search index...

    Function parsePositiveIntegerFlag

    • Parse a positive integer CLI flag. Absent stays undefined (the callee's default); anything else that is not a safe integer ≥ 1 fails loud naming the flag, never silently becoming NaN or the default. Used by --max-sessions so a typo cannot drop the live-session ceiling to 64. The failure is a usage refusal, so a command checks its flag values before any effect.

      Parameters

      • flag: string
      • raw: string | undefined

      Returns number | undefined