---
url: 'https://adk.nht.io/api/@nhtio/adk/turn_runner/type-aliases/OpenGateFn.md'
description: 'A function that opens a {@link @nhtio/adk!TurnGate} for the current turn.'
---

# Type Alias: OpenGateFn

```ts
type OpenGateFn = <T>(
  raw: Omit<RawTurnGate, "turnId" | "abortSignal">,
) => Promise<T>;
```

Defined in: [lib/types/turn\_runner.ts:261](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/types/turn_runner.ts#L261)

A function that opens a [@nhtio/adk!TurnGate](../../common/interfaces/TurnGate.md) for the current turn.

## Type Parameters

| Type Parameter | Description                                |
| -------------- | ------------------------------------------ |
| `T`            | The expected type of the resolution value. |

## Parameters

| Parameter | Type                                                                                                                                                                              |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `raw`     | [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)<[`RawTurnGate`](../../common/interfaces/RawTurnGate.md), `"turnId"` | `"abortSignal"`> |

## Returns

`Promise`<`T`>

## Remarks

Injected into [@nhtio/adk!TurnContext](../../types/interfaces/TurnContext.md) as `waitFor`. The runner closure supplies `turnId` and
`abortSignal` automatically — callers only provide the gate-specific fields.
