Skip to contentSlop Block

no-object-parameters

Error

Do not type a parameter as object.

function save(value: object) {}Do not type a parameter as object
const save = (value: object | null) => value;Do not type a parameter as object
// ast-grep-ignore: no-object-parameters-typescript

How to fix

object accepts any non-primitive and says nothing about its fields. Use the real type, or parse the input first.