mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Consistently use @returns
for returned data types in JSDoc comments
Sometimes we also used `@return`, but `@returns` is what the JSDoc documentation recommends. Even though `@return` works as an alias, it's good to use the recommended syntax and to be consistent within the project.
This commit is contained in:
parent
8b4ae6f3eb
commit
ca3a58f93a
16 changed files with 77 additions and 77 deletions
|
@ -83,8 +83,8 @@ class BasePreferences {
|
|||
/**
|
||||
* Stub function for writing preferences to storage.
|
||||
* @param {Object} prefObj The preferences that should be written to storage.
|
||||
* @return {Promise} A promise that is resolved when the preference values
|
||||
* have been written.
|
||||
* @returns {Promise} A promise that is resolved when the preference values
|
||||
* have been written.
|
||||
*/
|
||||
async _writeToStorage(prefObj) {
|
||||
throw new Error('Not implemented: _writeToStorage');
|
||||
|
@ -93,8 +93,8 @@ class BasePreferences {
|
|||
/**
|
||||
* Stub function for reading preferences from storage.
|
||||
* @param {Object} prefObj The preferences that should be read from storage.
|
||||
* @return {Promise} A promise that is resolved with an {Object} containing
|
||||
* the preferences that have been read.
|
||||
* @returns {Promise} A promise that is resolved with an {Object} containing
|
||||
* the preferences that have been read.
|
||||
*/
|
||||
async _readFromStorage(prefObj) {
|
||||
throw new Error('Not implemented: _readFromStorage');
|
||||
|
@ -102,8 +102,8 @@ class BasePreferences {
|
|||
|
||||
/**
|
||||
* Reset the preferences to their default values and update storage.
|
||||
* @return {Promise} A promise that is resolved when the preference values
|
||||
* have been reset.
|
||||
* @returns {Promise} A promise that is resolved when the preference values
|
||||
* have been reset.
|
||||
*/
|
||||
async reset() {
|
||||
await this._initializedPromise;
|
||||
|
@ -115,8 +115,8 @@ class BasePreferences {
|
|||
* Set the value of a preference.
|
||||
* @param {string} name The name of the preference that should be changed.
|
||||
* @param {boolean|number|string} value The new value of the preference.
|
||||
* @return {Promise} A promise that is resolved when the value has been set,
|
||||
* provided that the preference exists and the types match.
|
||||
* @returns {Promise} A promise that is resolved when the value has been set,
|
||||
* provided that the preference exists and the types match.
|
||||
*/
|
||||
async set(name, value) {
|
||||
await this._initializedPromise;
|
||||
|
@ -149,8 +149,8 @@ class BasePreferences {
|
|||
/**
|
||||
* Get the value of a preference.
|
||||
* @param {string} name The name of the preference whose value is requested.
|
||||
* @return {Promise} A promise that is resolved with a {boolean|number|string}
|
||||
* containing the value of the preference.
|
||||
* @returns {Promise} A promise resolved with a {boolean|number|string}
|
||||
* containing the value of the preference.
|
||||
*/
|
||||
async get(name) {
|
||||
await this._initializedPromise;
|
||||
|
@ -170,8 +170,8 @@ class BasePreferences {
|
|||
|
||||
/**
|
||||
* Get the values of all preferences.
|
||||
* @return {Promise} A promise that is resolved with an {Object} containing
|
||||
* the values of all preferences.
|
||||
* @returns {Promise} A promise that is resolved with an {Object} containing
|
||||
* the values of all preferences.
|
||||
*/
|
||||
async getAll() {
|
||||
await this._initializedPromise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue