Review code from the perspective of a new TypeScript developer. Use when the user asks whether code feels wrong, too indirect, too clever, hard to follow, or wants a pass focused on unnecessary abstractions, misleading names, layered type tricks, and first-read clarity.
Read the code like a smart but newly onboarded TypeScript developer.
The goal is not "make it shorter" or "make it more abstract." The goal is:
as assertions outside a clear parse or interop boundaryearns its keepprobably inlineablewrong ownership boundarymisleading nametype-system workaroundWhen reporting findings, prioritize:
When editing code:
*Bridge, *Contract, *Parser, *Factory, *Stateexport type SessionContract = { ... };
Portable type, honest name, obvious job.
export type AppAuth = {
options: { plugins: [...] }
};
If this is not the real auth type, do not name it like it is.
export type CustomSessionClientBridge = { ... };
If a library forces a type trick, keep it local and name it as a bridge.
The code should leave a new teammate thinking: