inlineParameterTypeParameter `{{parameter}}` uses an inline object type. Declare a named interface and reference it instead.small-rules/no-inline-signature-typesDisallow inline object types in parameter and return type annotations; declare a named interface instead.
An object type written inline in a parameter or a return type has no name. Callers can’t import it. Editors
list every property on every hover. The next function that needs the same properties copies them. A named
interface gives the type one home and one name, such as BadgeProperties for the props of Badge.
Return types include type predicates. The rule reports node is Reference & { name: Identifier }
like any other return type. Set returnTypes to false to check only parameters.
Set functions to components to check only PascalCase function components. Those include the functions
passed to memo or forwardRef. Set position to bare to report only an annotation that’s the object
type itself. Set it to wrapped to also report one inside a generic such as Readonly. The default,
anywhere, also looks inside unions, intersections, arrays, and tuples.
inlineParameterTypeParameter `{{parameter}}` uses an inline object type. Declare a named interface and reference it instead.inlineReturnTypeThe return type uses an inline object type. Declare a named interface and reference it instead.This rule accepts one options object after the severity.
export function Badge({ label }: Readonly<{ label: string }>): ReactNode { return <span>{label}</span>;}interface BadgeProperties { readonly label: string;}
export function Badge({ label }: Readonly<BadgeProperties>): ReactNode { return <span>{label}</span>;}