TypeScript · evidence
TS0003Keep unknown visible at its boundary
Reject type aliases that only conceal TypeScript's unknown type.
vite-doctor/typescriptevidencewarnSuggestion
Why it happens
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.
Fix
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>
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --extends auto,typescript/strict --rules typescript/evidence/no-unknown-type-aliases