# TS2341: Property '…' is private and only accessible within class '…'.

> A `private` member is used outside the class that declares it. Use a public method, or change its visibility.

## What it means

A member marked `private` can only be used inside its own class body, not in subclasses or
other code.

## Example

```ts
class Account {
  private balance = 0;
}

export const b = new Account().balance;
```

## How to fix

- Use a public method or getter that exposes what you need.
- Make the member `protected` (subclasses) or public if outside code should use it.

Source: https://ts-r.dev/errors/TS2341/
