doc: fix: docstring: use Promise

This commit is contained in:
2024-01-25 17:37:08 +01:00
committed by AdrienLSH
parent 22dd4a0299
commit f8490da953
8 changed files with 42 additions and 19 deletions

View File

@ -17,7 +17,7 @@ class Tourmanents
/**
*
* @param {Number} id
* @returns
* @returns {?Promise<Tournament>}
*/
async getTournament(id)
{
@ -47,6 +47,7 @@ class Tourmanents
/**
* @param {String} state must be "finished", or "started", or "waiting". Any other return all elements
* @returns {?Promise<[Tourmanent]>}
*/
async search(state)
{
@ -76,6 +77,10 @@ class Tourmanents
return tournaments;
}
/**
* Get all tournaments
* @returns {?Promise<[Tourmanent]>}
*/
async all()
{
return await this.search("");