Expand global.d.ts with code docs

- docs and syntax for toastr
- docs and syntax for Fuse
- docs and syntax for select2
- docs and syntax for sortable
This commit is contained in:
Wolfsblvt
2024-05-10 04:48:30 +02:00
parent 9db2f1cb91
commit eeaa52bf5d
2 changed files with 599 additions and 9 deletions

View File

@ -1865,7 +1865,7 @@ function highlightDefaultContext() {
/**
* Fuzzy search characters by a search term
* @param {string} searchValue - The search term
* @returns {{item?: *, refIndex: number, score: number}[]} Results as items with their score
* @returns {FuseResult[]} Results as items with their score
*/
export function fuzzySearchCharacters(searchValue) {
// @ts-ignore
@ -1898,7 +1898,7 @@ export function fuzzySearchCharacters(searchValue) {
* Fuzzy search world info entries by a search term
* @param {*[]} data - WI items data array
* @param {string} searchValue - The search term
* @returns {{item?: *, refIndex: number, score: number}[]} Results as items with their score
* @returns {FuseResult[]} Results as items with their score
*/
export function fuzzySearchWorldInfo(data, searchValue) {
// @ts-ignore
@ -1927,7 +1927,7 @@ export function fuzzySearchWorldInfo(data, searchValue) {
* Fuzzy search persona entries by a search term
* @param {*[]} data - persona data array
* @param {string} searchValue - The search term
* @returns {{item?: *, refIndex: number, score: number}[]} Results as items with their score
* @returns {FuseResult[]} Results as items with their score
*/
export function fuzzySearchPersonas(data, searchValue) {
data = data.map(x => ({ key: x, name: power_user.personas[x] ?? '', description: power_user.persona_descriptions[x]?.description ?? '' }));
@ -1951,7 +1951,7 @@ export function fuzzySearchPersonas(data, searchValue) {
/**
* Fuzzy search tags by a search term
* @param {string} searchValue - The search term
* @returns {{item?: *, refIndex: number, score: number}[]} Results as items with their score
* @returns {FuseResult[]} Results as items with their score
*/
export function fuzzySearchTags(searchValue) {
// @ts-ignore
@ -1973,7 +1973,7 @@ export function fuzzySearchTags(searchValue) {
/**
* Fuzzy search groups by a search term
* @param {string} searchValue - The search term
* @returns {{item?: *, refIndex: number, score: number}[]} Results as items with their score
* @returns {FuseResult[]} Results as items with their score
*/
export function fuzzySearchGroups(searchValue) {
// @ts-ignore