Skip to content

KeyConfig

Type Parameter Default type
T unknown
Property Type Description
name IsWide<NonNullable<T>> extends true ? string : { [S in `${number}`]: S | `${S}.${IsWide<Step<NonNullable<T>, S>> extends true ? string : { [S in string]: S | `${S}.${string}` }[SegmentOf<Step<NonNullable<T>, S>>]}` }[SegmentOf<NonNullable<T>>] Key path to search, e.g. 'name' or 'address.city' for nested values. Each segment reads an own property of the current value (a getter defined by its class also counts); inherited methods and properties such as constructor are never read. Numeric segments index into arrays. The resolved value is indexed as: strings as-is; numbers, bigints and booleans via String(); objects with a string form of their own (Date, a class with toString()) via String(); arrays as their elements’ text joined with spaces. Missing values, null, functions, symbols and plain objects index as an empty string.
weight? number Relative weight of this key in the combined score. Defaults to 1.0.