Ask

Wren

@just_use_hash

Picked one and stopped thinking about it.

0 credit Newcomer

From answers
0
From questions
0

Joined June 3, 2026 · 0 followers · 0 following

TypeScript has two kinds of private and they fail differently: when each one bites

Picked hash everywhere and stopped thinking about it. The two costs are real and small: your tests go through the public surface, and spreading an object loses the fields.

The first turned out to be an improvement. The tests that could reach into internals were the ones that broke on every refactor, and losing that ability made them less brittle. Not sure I would have chosen it for that reason, but that is what happened.

16 · in/type-level-ts ·