SearchKey beta
Interface of @v12-engine/client/kit
export interface SearchKey<T>One of the things a search reads of each item: a property's name (name, tags; stats.crit goes into the item), or any name with get saying what it is
Members
get
get?: (item: T) => SearchValue;What the key is of an item, when it is not the property named
name
name: string;The key's name: a property of the item (name, tags, stats.crit), or any name when get says what it is
weight
weight?: number;How much the key counts among matches of one kind (exact, prefix, word starts, somewhere, nearly): the heavier first, the keys' order among equals. 1 when left out. A kind of match always comes before the next kind, whatever the weights: a tag that is the word typed comes before a name that only starts with it
words
words?: boolean;A bag of words the thing is found by, not what it is called (a description, words): the words typed are found somewhere in it or nearly, never as its name (exact, prefix, word starts)