Я пытаюсь задокументировать следующий метод, который возвращает только три значения: «активный», «неактивный» или «заблокированный».
Javascript код:
/**
* Returns the current post status.
* @return {string} the current status: 'inactive', 'active' or 'blocked'.
*/
function getStatus() {
if (this.status === 0) return 'inactive';
if (this.status === 1) return 'active';
if (this.status === 2) return 'blocked';
}
Есть ли способ указать возвращаемое значение? Может быть что-то вроде:
@return {string=('inactive'|'active'|'blocked')} the current status.
Если нет, то как мне это сделать?