# session.Session.equals

- **Module:** session.Session
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/session.ts#L434
- **Page:** https://libtmux.org/en/ts/latest/reference/session-session-equals/

```
session.Session.equals(other: : unknown) -> boolean
```

Whether `other` is this same session on this same server.

The socket, the daemon that answered, and `$n` all have to match. tmux ids
are unique only within one running daemon and a restart reissues `$0` to
something else, so the daemon is part of the identity rather than a detail
of how it was read. {@link sameTmuxIdAs} asks the weaker question.

## Example

```ts
session.equals(await session.refreshed()); // true
```
