# TSR0803: 'this' escapes from the constructor through '…' before subclass fields are initialised. Make it '#private', or do this after construction (a static factory).

> A constructor calls an overridable method or passes 'this' out, before subclass fields exist. Make the method #private or use a static factory.

## What it means

A subclass's fields aren't initialised until the base constructor returns, so a base constructor that calls a method a subclass can override (or passes `this` out) can run subclass code on a half-built object. `#private` and `private` members are allowed, because their bodies are checked by the same rule.

## Example

```ts
// A base constructor calls a method a subclass can override.
class Base {
  constructor() {
    this.setup(); // @expect TSR0803
  }
  setup(): void {
    console.log("base");
  }
}
new Base();
export {};
```

## How to fix

- Make the helper `#private`.
- Replace two-phase initialisation with a static factory that constructs, then calls the setup method.

Sound mode is defined in [design record 0007](https://github.com/Webb-Ventures/typescript-rust/blob/main/docs/design/0007-sound-mode.md) (accepted 2026-10-15).

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