# server.Server.equals

- **Module:** server.Server
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/server.ts#L1062
- **Page:** https://libtmux.org/reference/ts/server-server-equals/

```
server.Server.equals(other: : unknown) -> boolean
```

Whether `other` is a handle addressing the same tmux server.

Compared by the socket the connection resolves to rather than by object
identity, so a server constructed twice against one socket is equal to
itself. A socket *name* is not that socket: tmux resolves `-L work` under
`TMUX_TMPDIR`, so the same name with two different tmpdirs addresses two
different daemons, and this reports them as different. Accepts `unknown`
because the interesting comparisons are against values a caller has not
narrowed yet.

## Example

```ts
server.equals(new Server({ socketPath: server.socketPath ?? "" }));
```
