# pane.Pane.joinTo

- **Module:** pane
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/pane.ts#L618
- **Page:** https://libtmux.org/en/ts/latest/reference/pane-pane-jointo/

```
joinTo(
  target: Pane | Window | string,
  options?: JoinOptions,
): Promise<void>
```

Move this pane into another window as a split.

## Examples

```ts
import { PaneDirection } from "libtmux";
await pane.joinTo(window.id, { direction: PaneDirection.Below });
```

## Parameters

- `target` (`Pane | Window | string`)
- `options?` (`JoinOptions`)

## tmux command

The tmux commands behind `joinTo`.

- [`join-pane`](/en/tmux/latest/manual/join-pane/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_join_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_join_pane_entry/) (attribute)
- [`cmd_join_pane_exec`](/en/tmux/latest/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function)

## In other ports

Move a pane into another window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.join`](/en/py/latest/reference/libtmux-pane-join/) (method) |
| Ruby | [`LibTmux::Pane#join`](/en/ruby/latest/reference/libtmux-pane-join/) (method) |
| Rust | no equivalent on `Pane` |
| Go | [`tmux.Pane.Join`](/en/go/latest/reference/tmux-pane-join/) (method) |
| Java | [`io.github.libtmux.Pane.joinTo`](/en/java/latest/reference/io-github-libtmux-pane-pane-jointo/) (method) |
| C# | [`LibTmux.Pane.JoinAsync`](/en/csharp/latest/reference/libtmux-pane-joinasync/) (method) |
| C++ | [`libtmux::Pane::join`](/en/cxx/latest/reference/libtmux-pane-join/) (method) |
| Swift | [`Server.join(_:into:direction:size:)`](/en/swift/latest/reference/server-join(_-into-direction-size-)/) (method) |

No equivalent is recorded in Lua, PowerShell, Julia, Elixir, Kotlin, Scala or F#.
