# MergePath

**Kind:** Type

**Source:** [`src/types.ts`](https://github.com/honojs/hono/blob/main/src/types.ts#L2610)

## Definition

```ts
B extends '' ? MergePath<A, '/'> : A extends '' ? B : A extends '/' ? B : A extends `${infer P}/` ? B extends `/${infer Q}` ? `${P}/${Q}` : `${P}/${B}` : B extends `/${infer Q}` ? Q extends '' ? A : `${A}/${Q}` : `${A}/${B}`
```
