# window.Window.session

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

```
session(): Session | undefined
```

The session this placement belongs to.

## Examples

```ts
window.session?.name;
```

## Guides

Pages that discuss `session`.

- [Traversal](/en/ts/latest/topics/traversal/)

## In other ports

Find the session containing a window placement

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.session`](/en/py/latest/reference/libtmux-window-session/) (property) |
| Ruby | [`LibTmux::WindowLink#session`](/en/ruby/latest/reference/libtmux-windowlink-session/) (method) |
| Lua | [`libtmux.SnapshotWindowLink.session`](/en/lua/latest/reference/libtmux-snapshotwindowlink-session/) (attribute) |
| Rust | [`window.Window.session`](/en/rs/latest/reference/window-window-session/) (method) |
| Go | [`tmux.Window.Session`](/en/go/latest/reference/tmux-window-session/) (method) |
| Java | [`io.github.libtmux.Window.session`](/en/java/latest/reference/io-github-libtmux-window-window-session/) (method) |
| Kotlin | [`io.github.libtmux.kotlin.Window.session`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-window-session/) (property) |
| Scala | [`io.github.libtmux.scaladsl.Window.session`](/en/scala/latest/reference/io-github-libtmux-scaladsl-window-session/) (method) |
| C# | [`LibTmux.Window.Session`](/en/csharp/latest/reference/libtmux-window-session/) (property) |
| C++ | [`libtmux::Window::session`](/en/cxx/latest/reference/libtmux-window-session/) (method) |
| Swift | a Window has no single parent; Snapshot.sessions(of:) lists every linking session |

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