# routeDecision (/docs/api/core/functions/routeDecision)



```ts
function routeDecision<Q>(decision, rules): Decision<Q>;
```

`NoInfer` keeps `Q` coming from the Decision alone, so an unannotated Rule literal is checked
against it instead of widening it. Inside a generic body TS cannot see that `Rule<Q>` narrows
`Rule`, so the public signature is an overload and the implementation is erased. Rules typed
against Action ids, `Rule<Q, A>`, fit as they are: `action` only narrows.

## Type Parameters [#type-parameters]

| Type Parameter                                                   |
| ---------------------------------------------------------------- |
| `Q` *extends* [`Questions`](/docs/api/core/interfaces/Questions) |

## Parameters [#parameters]

| Parameter  | Type                                                                    |
| ---------- | ----------------------------------------------------------------------- |
| `decision` | [`Decision`](/docs/api/core/interfaces/Decision)\<`Q`>                  |
| `rules`    | `NoInfer`\<[`Rule`](/docs/api/core/interfaces/Rule)\<`Q`, `string`>>\[] |

## Returns [#returns]

[`Decision`](/docs/api/core/interfaces/Decision)\<`Q`>
