# session.Session.equals

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

```
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. [`sameTmuxIdAs`](/en/ts/latest/reference/session-session-sametmuxidas/) asks the weaker question.

## Examples

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

## Parameters

- `other` (`unknown`)
