Bug 1801529 - Fix some jsdocs to pass enabling eslint-plugin-jsdoc in mail/modules. rs=me
--HG-- extra : amend_source : 75c6eb1cb5616b7d08ee075fb1a75e7275742c94
This commit is contained in:
Родитель
7c890fae17
Коммит
51789ee837
|
@ -108,6 +108,7 @@ function getAttachmentKeywords(mailData, keywordsInCsv) {
|
|||
|
||||
/**
|
||||
* Worker message event handler.
|
||||
*
|
||||
* @param {Event} event - "message" posted from parent.
|
||||
*/
|
||||
self.onmessage = function (event) {
|
||||
|
|
|
@ -64,7 +64,7 @@ export class AttachmentInfo {
|
|||
* been detached to file or is a link attachment.
|
||||
* @param {object} options.message - The message object associated to this
|
||||
* attachment.
|
||||
* @param {function} [updateAttachmentsDisplayFn] - An optional callback
|
||||
* @param {Function} [updateAttachmentsDisplayFn] - An optional callback
|
||||
* function that is called to update the attachment display at appropriate
|
||||
* times.
|
||||
*/
|
||||
|
@ -503,7 +503,7 @@ export class AttachmentInfo {
|
|||
* is accessible. For http and file urls, fetch() will have the size
|
||||
* in the content-length header.
|
||||
*
|
||||
* @returns {Boolean}
|
||||
* @returns {boolean}
|
||||
* true if the attachment is empty or error, false otherwise.
|
||||
*/
|
||||
async isEmpty() {
|
||||
|
|
|
@ -56,6 +56,7 @@ export const DNS = {
|
|||
|
||||
/**
|
||||
* Look up SRV records for hostname.
|
||||
*
|
||||
* @param {string} hostname
|
||||
* @returns {Promise<SRVRecord[]> records.
|
||||
*/
|
||||
|
@ -65,6 +66,7 @@ export const DNS = {
|
|||
|
||||
/**
|
||||
* Look up TXT records for hostname.
|
||||
*
|
||||
* @param {string} hostname
|
||||
* @returns {Promise<TXTRecord[]> records.
|
||||
*/
|
||||
|
@ -74,6 +76,7 @@ export const DNS = {
|
|||
|
||||
/**
|
||||
* Look up MX records for hostname.
|
||||
*
|
||||
* @param {string} hostname
|
||||
* @returns {Promise<MXRecord[]> records.
|
||||
*/
|
||||
|
|
|
@ -11,6 +11,7 @@ export const FolderPaneUtils = {
|
|||
/**
|
||||
* Used for comparing folder names. This matches the collator used in
|
||||
* `nsMsgDBFolder::createCollationKeyGenerator`.
|
||||
*
|
||||
* @type {Intl.Collator}
|
||||
*/
|
||||
nameCollator: new Intl.Collator(undefined, {
|
||||
|
|
|
@ -182,10 +182,10 @@ export var MailUtils = {
|
|||
* is used, and the window is brought to the front
|
||||
* - if no 3pane windows are open, a standalone window is opened instead
|
||||
* of a tab
|
||||
* @param {Boolean} [forceTab] - Boolean that let us know when the middle
|
||||
* @param {boolean} [forceTab] - Boolean that let us know when the middle
|
||||
* click button triggered the event. We then proceed to open the message in
|
||||
* a new tab.
|
||||
* @param {Boolean} [shiftPressed] - We take into account if the user pressed
|
||||
* @param {boolean} [shiftPressed] - We take into account if the user pressed
|
||||
* the shift key to know how to open a message in a new tab.
|
||||
*/
|
||||
displayMessages(
|
||||
|
@ -249,7 +249,7 @@ export var MailUtils = {
|
|||
* is used, and the window is brought to the front
|
||||
* - if no 3pane windows are open, a standalone window is opened instead
|
||||
* of a tab
|
||||
* @param {Boolean} [shiftPressed] - We take into account if the user pressed
|
||||
* @param {boolean} [shiftPressed] - We take into account if the user pressed
|
||||
* the shift key to know how to open a message in a new tab. We only look at
|
||||
* the loadInBackground preferefence if this value is provided.
|
||||
*/
|
||||
|
@ -845,6 +845,7 @@ export var MailUtils = {
|
|||
* Take the message id from the messageIdNode and use the url defined in the
|
||||
* hidden pref "mailnews.messageid_browser.url" to open it in a browser window
|
||||
* (%mid is replaced by the message id).
|
||||
*
|
||||
* @param {string} messageId - The message id to open.
|
||||
*/
|
||||
openBrowserWithMessageId(messageId) {
|
||||
|
@ -974,6 +975,7 @@ export var MailUtils = {
|
|||
/**
|
||||
* A class that listens to notifications about folders, and deals with them
|
||||
* appropriately.
|
||||
*
|
||||
* @implements {nsIObserver}
|
||||
*/
|
||||
class FolderNotificationManager {
|
||||
|
|
|
@ -43,11 +43,12 @@ export var MailViewManager = {
|
|||
* We define our own little view definition abstraction because some day this
|
||||
* functionality may want to be generalized to be usable by gloda as well.
|
||||
*
|
||||
* @param aViewDef The view definition, three attributes are required:
|
||||
* - name: A string name for the view, for debugging purposes only. This
|
||||
* should not be localized!
|
||||
* - index: The index to assign to the view.
|
||||
* - makeTerms: A function to invoke that returns a list of search terms.
|
||||
* @param {object} aViewDef - The view definition.
|
||||
* @param {string} aViewDef.name - Name for the view, for debugging
|
||||
* purposes only. This should not be localized!
|
||||
* @param {integer} aViewDef.index - The index to assign to the view.
|
||||
* @param {Function} aViewDef.makeTerms - A function to invoke that returns
|
||||
* a list of search terms.
|
||||
*/
|
||||
defineView(aViewDef) {
|
||||
this._views[aViewDef.index] = aViewDef;
|
||||
|
@ -84,12 +85,12 @@ export var MailViewManager = {
|
|||
/**
|
||||
* Return the view definition associated with the given view index.
|
||||
*
|
||||
* @param aViewIndex If the value is an integer it references the built-in
|
||||
* view with the view index from MailViewConstants, or if the index
|
||||
* is >= MailViewConstants.kViewItemFirstCustom, it is a reference to
|
||||
* a custom view definition. If the value is a string, it is the name
|
||||
* of a custom view. The string case is mainly intended for testing
|
||||
* purposes.
|
||||
* @param {integer|string} aViewIndex - If the value is an integer it
|
||||
* references the built-in view with the view index from MailViewConstants,
|
||||
* or if the index is >= MailViewConstants.kViewItemFirstCustom, it is a
|
||||
* reference to a custom view definition. If the value is a string, it is
|
||||
* the name of a custom view.
|
||||
* The string case is mainly intended for testing purposes.
|
||||
*/
|
||||
getMailViewByIndex(aViewIndex) {
|
||||
if (typeof aViewIndex == "string") {
|
||||
|
|
|
@ -308,7 +308,7 @@ export var PluralForm = {
|
|||
* The number to decide which plural form to use
|
||||
* @param aWords
|
||||
* A semi-colon (;) separated string of words to pick the plural form
|
||||
* @return The appropriate plural form of the word
|
||||
* @returns The appropriate plural form of the word
|
||||
*/
|
||||
get get() {
|
||||
// This method will lazily load to avoid perf when it is first needed and
|
||||
|
@ -332,7 +332,7 @@ export var PluralForm = {
|
|||
*
|
||||
* @param aRuleNum
|
||||
* The plural rule number to create functions
|
||||
* @return A pair: [function that gets the right plural form,
|
||||
* @returns A pair: [function that gets the right plural form,
|
||||
* function that returns the number of plural forms]
|
||||
*/
|
||||
makeGetter(aRuleNum) {
|
||||
|
@ -390,7 +390,7 @@ export var PluralForm = {
|
|||
/**
|
||||
* Get the number of forms for the current plural rule
|
||||
*
|
||||
* @return The number of forms
|
||||
* @returns The number of forms
|
||||
*/
|
||||
get numForms() {
|
||||
// We lazily load numForms, so trigger the init logic with get()
|
||||
|
@ -401,7 +401,7 @@ export var PluralForm = {
|
|||
/**
|
||||
* Get the plural rule number for the current app locale
|
||||
*
|
||||
* @return The plural rule number
|
||||
* @returns The plural rule number
|
||||
*/
|
||||
get ruleNum() {
|
||||
return LOCALE_PLURAL_NUMBER[Services.locale.appLocaleAsBCP47] ?? 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче