move parse() from config.ts into loader.ts
Reading config.ts, then moving parse() into a new loader.ts.
loader.ts
+1export function parse(src): ConfigSchema {
+2 return normalize(src)
+3}
config.ts
-1export function parse(src): ConfigSchema {
-2 // legacy v1: coerce string ports to numbers
-3 // (kept — may be re-enabled for the 8080 case)
-4 // if (typeof src.port === 'string') src.port = +src.port
-5 return normalize(src)
-6}
+1import { parse } from "./loader"
Problem
move parse() from config.ts into loader.ts
Reading config.ts, then moving parse() into a new loader.ts.
Moved parse() into loader.ts. Done.
REFACTOR GUARDRAIL: that was a move, but it was regenerated — the commented legacy block was dropped. A move must be mechanical and reconcile to the source. Redo it with a line-for-line move.
Fair — that was a refactor. Resetting and moving the lines mechanically.
$sed -n '1,6p' config.ts >> loader.ts && sed -i '1,6c\import { parse } from "./loader"' config.ts
Solution