TypeScript · TS0003

Keep unknown visible at its boundary

Reject type aliases that only conceal TypeScript's unknown type.
TS0003vite-doctor/typescriptevidencewarnSuggestion

Run this rule

pnpm vite-doctor . --extends auto,typescript/strict --rules typescript/evidence/no-unknown-type-aliases

Why it matters

Renaming unknown makes an unparsed value look like a domain contract without adding evidence. Callers still cannot use the value safely, but the alias hides where parsing belongs.

Keep unknown explicit at the input boundary, then return a parsed owner type.

Example

Parse an external value

Before

type ExternalUser = unknown

After

type User = z.infer<typeof UserSchema>
Copyright © 2026