Skip to content

Commit

Permalink
fix: improved jsdocs for search method
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Feb 29, 2024
1 parent 1c21c0c commit 5dcf288
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/src/services/DbCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,16 @@ module.exports = class DbCheck {

/**
* @template {import("@rm/types").BaseRecord} T
* @param {import("../models").ScannerModelKeys} model
* @template {import("../models").ScannerModelKeys} U
* @param {U} model
* @param {import("@rm/types").Permissions} perms
* @param {object} args
* @param {'search' | string} method
* @param {U extends 'Gym' ? 'searchRaids' | 'search'
* : U extends 'Pokestop' ? 'searchInvasions' | 'searchQuests' | 'searchLures' | 'search'
* : U extends 'Pokemon' ? 'search'
* : U extends 'Portal' ? 'search'
* : U extends 'Nest' ? 'search'
* : never} method
* @returns {Promise<T[]>}
*/
async search(model, perms, args, method = 'search') {
Expand Down

0 comments on commit 5dcf288

Please sign in to comment.