mirror of
https://gh-proxy.org/https://github.com/klinsmaya/openclaw.git
synced 2026-11-09 13:26:38 +08: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;
|
|
}
|