import * as T from "../../../base/lib/types" export type InstallFn = (opts: { effects: T.Effects }) => Promise export class Install { private constructor(readonly fn: InstallFn) {} static of( fn: InstallFn, ) { return new Install(fn) } async install({ effects }: Parameters[0]) { await this.fn({ effects, }) } } export function setupInstall( fn: InstallFn, ) { return Install.of(fn) }