class API { static async fetchIndex(): Promise { const response = await fetch("/"); if (!response.ok) throw new Error("Failed to fetch index.html"); return response.text(); } static async fetchStaticFile(path: string): Promise { const response = await fetch(`/${path}`); if (!response.ok) throw new Error(`Failed to fetch ${path}`); return response.text(); } } export default API;