export function bindMethods(obj: T) { for (const key in obj) if (typeof obj[key] === "function") obj[key] = obj[key].bind(obj) }