462
}
463
}
465
>
// if we have a score, ensure that the positions are
466
>
// sorted in ascending order and distinct
467
>
return {
468
>
score: totalScore,
469
>
labelMatch: normalizeMatches(totalLabelMatches),
470
>
descriptionMatch: normalizeMatches(totalDescriptionMatches)
471
>
};
472
>
}
473
474
function doScoreItemFuzzySingle(label: string, description: string | undefined, path: string | undefined, query: IPreparedQueryPiece, preferLabelMatches: boolean, allowNonContiguousMatches: boolean): IItemScore {