# session.Session.equals

- **Module:** session.Session
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/session.ts#L427
- **Page:** https://libtmux.org/reference/ts/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
```
