mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-05-09 03:00:20 -04: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;
|
|
}
|