Skip to contentSlop Block

no-unsafe-dictionary-type

Error

Give dictionary values a concrete type. Generic constraints such as T extends Record<string, unknown> are allowed.

type Metadata = Record<string, unknown>;Give dictionary values a concrete type instead of unknown, any, object or {}
type Options = Record<string, any>;Give dictionary values a concrete type instead of unknown, any, object or {}
type OtherMetadata = { [key: string]: object };Give dictionary values a concrete type instead of unknown, any, object or {}
// ast-grep-ignore: no-unsafe-dictionary-type-typescript

How to fix

Generic constraints such as T extends Record<string, unknown> are allowed.