---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/interfaces/IsolatedFunctionHandle.md
description: 'The live handle returned by [`isolateFunction`](https://adk.nht.io/api/@nhtio/adk/batteries/functions/isolateFunction).'
---

# Interface: IsolatedFunctionHandle\<A, R>

Defined in: [src/batteries/isolation/isolate\_function.ts:133](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/isolate_function.ts#L133)

The live handle returned by [isolateFunction](../functions/isolateFunction.md).

## Type Parameters

| Type Parameter            |
| ------------------------- |
| `A` *extends* `unknown`\[] |
| `R`                       |

## Properties

| Property                                | Type                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Defined in                                                                                                                                              |
| --------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `dispose` | () => `void`                         | Terminate the guest Worker and revoke its Blob URL. Every in-flight (and future) `invoke()` call rejects with @nhtio/adk/batteries/isolation!E\_ISOLATED\_TERMINATED. Idempotent.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | [src/batteries/isolation/isolate\_function.ts:148](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/isolate_function.ts#L148) |
|  `invoke`   | (...`args`: `A`) => `Promise`<`R`> | Invoke the isolated function with `args`, returning its result (or rejecting with whatever it threw/rejected with, reconstructed as a plain `Error`). Lazily spawns the guest Worker on the first call; subsequent calls reuse it. **Throws** [E\_ISOLATE\_FUNCTION\_ARG\_UNSUPPORTED](../variables/E_ISOLATE_FUNCTION_ARG_UNSUPPORTED.md) when an argument cannot cross into the guest. **Throws** @nhtio/adk/batteries/isolation!E\_ISOLATION\_UNSUPPORTED\_ENV when no browser `Worker` global is present. **Throws** @nhtio/adk/batteries/isolation!E\_ISOLATED\_CRASHED when the guest has crashed. **Throws** @nhtio/adk/batteries/isolation!E\_ISOLATED\_TERMINATED after `dispose()`. | [src/batteries/isolation/isolate\_function.ts:145](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/isolate_function.ts#L145) |
