mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 21:31:26 +00:00
9 lines
255 B
TypeScript
9 lines
255 B
TypeScript
import { parseStrictPositiveInteger } from "../../infra/parse-finite-number.js";
|
|
|
|
export function parsePort(raw: unknown): number | null {
|
|
if (raw === undefined || raw === null) {
|
|
return null;
|
|
}
|
|
return parseStrictPositiveInteger(raw) ?? null;
|
|
}
|