improve performance

This commit is contained in:
LenAnderson
2024-04-16 16:44:48 -04:00
parent b36740d3a2
commit 001b22bec0
2 changed files with 241 additions and 103 deletions

View File

@ -10,11 +10,28 @@ export const OPTION_TYPE = {
'VARIABLE_NAME': 3,
};
export class SlashCommandFuzzyScore {
/**@type {number}*/ start;
/**@type {number}*/ longestConsecutive;
/**
* @param {number} start
* @param {number} longestConsecutive
*/
constructor(start, longestConsecutive) {
this.start = start;
this.longestConsecutive = longestConsecutive;
}
}
export class SlashCommandAutoCompleteOption {
/**@type {OPTION_TYPE}*/ type;
/**@type {string|SlashCommand}*/ value;
/**@type {string}*/ name;
/**@type {SlashCommandFuzzyScore}*/ score;
/**@type {string}*/ replacer;
/**@type {HTMLElement}*/ dom;
/**