/** * Parses a fxserver version convar into a number. */ export const parseFxserverVersion = (version: any): ParseFxserverVersionResult => { if (typeof version !== 'string') throw new Error(`expected string`); return { valid: true, branch: "master", build: 9999, platform: "windows", } }; type ParseFxserverVersionResult = { valid: true; branch: string; build: number; platform: string; } | { valid: false; branch: null; build: null; platform: 'windows' | 'linux' | null; };