UNPKG

fuzzy-rater

Version:

Tooling for fuzzily rating text according to some query

36 lines 1.24 kB
import { IQueryWord } from "./IQueryWord"; /** Match data that can be used for highlighting */ export declare type IMatchGroup = { /** The range of text that this data applies to */ range: { start: number; end: number; text: string; }; /** The data about how this text matches the query */ relations: IMatchGroupRelationData[]; }; /** * Information about what query data this matched or mismatched */ export declare type IMatchGroupRelationData = { /** * The type of transition * - insert: Matches a character that wasn't in the query * - skip: Skips a character that was in the query * - match: Matches a character in the text with the character in the query * - replace: Replaces a query character for another character */ type: "insert" | "skip" | "match" | "replace"; /** The query word that this data is for*/ word: IQueryWord; /** The range of the text on the query data */ range: { start: number; end: number; text: string; }; /** Whether this match was part of the best match sequence */ partOfBestOrder: boolean; }; //# sourceMappingURL=IMatchGroup.d.ts.map