# server.Server.equals

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

```
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`](https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown)
because the interesting comparisons are against values a caller has not
narrowed yet.

## Examples

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

## Parameters

- `other` (`unknown`)
