wideningThe explicit {{target}} type on {{subject}} discards known type evidence. Keep inference, validate with `satisfies`, or use a named owner contract.small-rules/no-known-value-wideningDisallow syntactically established values from flowing into explicitly broad or anonymous target types that discard useful evidence.
Ported from dmmulroy/anti-slop. An explicit
unknown, object, open dictionary, or anonymous-object annotation can erase the
useful evidence an object literal already has. I prefer inference, or satisfies when you need
to validate the object against a wider contract without throwing away its known keys.
wideningThe explicit {{target}} type on {{subject}} discards known type evidence. Keep inference, validate with `satisfies`, or use a named owner contract.This rule does not accept options.
const value: unknown = {};type Command = () => void;const startCommand = () => {};const commands = { start: startCommand } satisfies Record<string, Command>;