TypeScript · evidence
TS0002Use concrete input contracts instead of object
Reject function parameters typed as the broad object type.
vite-doctor/typescriptevidencewarnSuggestion
Why it happens
The object type proves only that a value is not primitive. It gives the function no usable property contract and usually postpones parsing until after the input has crossed its owner boundary.
Fix
Accept a named owner type or parse unknown input before calling the function.
Example
Name the accepted contract
Before
function save(value: object) {}
After
function save(value: SavedRecord) {}
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-object-parameters