(x: any)
| 26 | |
| 27 | export async function getValidPort(argvPort?: number): Promise<number> { |
| 28 | const validate = (x: any) => { |
| 29 | const p = parseInt(x); |
| 30 | return isNaN(p) ? null : p; |
| 31 | }; |
| 32 | |
| 33 | const port = validate(argvPort) ?? (await findAvailablePort(DEFAULT_PORT)); |
| 34 | if (!port) { |