fix(tsconnect-react): add overloads to useBuildIpnWorker to make it clear options are incompatible with factory

This commit was merged in pull request #39.
This commit is contained in:
2026-06-20 16:23:56 +00:00
parent 52069887f3
commit 050de5c2f3
+11
View File
@@ -35,6 +35,17 @@ export function useBuildIpn(
return ipn
}
export function useBuildIpnWorker(
worker: () => SharedWorker,
config?: WorkerConfig | null,
runParams?: Parameters<IPN["run"]>[0] | null,
): IpnWorkerClient | null
export function useBuildIpnWorker(
worker: string | URL | null,
config?: WorkerConfig | null,
runParams?: Parameters<IPN["run"]>[0] | null,
workerOptions?: WorkerOptions,
): IpnWorkerClient | null
export function useBuildIpnWorker(
worker: string | URL | null | (() => SharedWorker),
config: WorkerConfig | null = null,