mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08: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
|
@ -36,7 +36,8 @@ class AnnotationFactory {
|
|||
* @param {Object} ref
|
||||
* @param {PDFManager} pdfManager
|
||||
* @param {Object} idFactory
|
||||
* @return {Promise} A promise that is resolved with an {Annotation} instance.
|
||||
* @returns {Promise} A promise that is resolved with an {Annotation}
|
||||
* instance.
|
||||
*/
|
||||
static create(xref, ref, pdfManager, idFactory) {
|
||||
return pdfManager.ensure(this, '_create',
|
||||
|
@ -318,7 +319,7 @@ class Annotation {
|
|||
* @memberof Annotation
|
||||
* @param {number} flag - Hexadecimal representation for an annotation
|
||||
* characteristic
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
* @see {@link shared/util.js}
|
||||
*/
|
||||
hasFlag(flag) {
|
||||
|
@ -780,7 +781,7 @@ class WidgetAnnotation extends Annotation {
|
|||
* @private
|
||||
* @memberof WidgetAnnotation
|
||||
* @param {Dict} dict - Complete widget annotation dictionary
|
||||
* @return {string}
|
||||
* @returns {string}
|
||||
*/
|
||||
_constructFieldName(dict) {
|
||||
// Both the `Parent` and `T` fields are optional. While at least one of
|
||||
|
@ -826,7 +827,7 @@ class WidgetAnnotation extends Annotation {
|
|||
* @memberof WidgetAnnotation
|
||||
* @param {number} flag - Hexadecimal representation for an annotation
|
||||
* field characteristic
|
||||
* @return {boolean}
|
||||
* @returns {boolean}
|
||||
* @see {@link shared/util.js}
|
||||
*/
|
||||
hasFieldFlag(flag) {
|
||||
|
|
|
@ -98,7 +98,7 @@ const ROMAN_NUMBER_MAP = [
|
|||
* @param {number} number - The number that should be converted.
|
||||
* @param {boolean} lowerCase - Indicates if the result should be converted
|
||||
* to lower case letters. The default value is `false`.
|
||||
* @return {string} The resulting Roman number.
|
||||
* @returns {string} The resulting Roman number.
|
||||
*/
|
||||
function toRomanNumerals(number, lowerCase = false) {
|
||||
assert(Number.isInteger(number) && number > 0,
|
||||
|
|
|
@ -2095,7 +2095,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
/**
|
||||
* Builds a char code to unicode map based on section 9.10 of the spec.
|
||||
* @param {Object} properties Font properties object.
|
||||
* @return {Promise} A Promise that is resolved with a
|
||||
* @returns {Promise} A Promise that is resolved with a
|
||||
* {ToUnicodeMap|IdentityToUnicodeMap} object.
|
||||
*/
|
||||
buildToUnicode(properties) {
|
||||
|
|
|
@ -732,7 +732,7 @@ var Font = (function FontClosure() {
|
|||
* private use area. This is done to avoid issues with various problematic
|
||||
* unicode areas where either a glyph won't be drawn or is deformed by a
|
||||
* shaper.
|
||||
* @return {Object} Two properties:
|
||||
* @returns {Object} Two properties:
|
||||
* 'toFontChar' - maps original char codes(the value that will be read
|
||||
* from commands such as show text) to the char codes that will be used in the
|
||||
* font that we build
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue