TypeScript · TS0002
Use concrete input contracts instead of object
Reject function parameters typed as the broad object type.
typescript/evidence/no-object-parameterssrc/rule-packs/typescript/rules/no-object-parameters.ts Upstream docs Run this rule
pnpm vite-doctor . --extends auto,typescript/strict --rules typescript/evidence/no-object-parameters
Why it matters
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.
Recommended fix
Accept a named owner type or parse unknown input before calling the function.
Useful links
Example
Name the accepted contract
Before
function save(value: object) {}
After
function save(value: SavedRecord) {}