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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user