Consistently use number
for numeric data types in JSDoc comments
Sometimes we also used `Number` and `integer`, but `number` is what the JSDoc documentation recommends.
This commit is contained in:
parent
ff37cdb5d7
commit
e75991b49e
@ -530,7 +530,7 @@ class AnnotationBorderStyle {
|
||||
*
|
||||
* @public
|
||||
* @memberof AnnotationBorderStyle
|
||||
* @param {integer} width - The width.
|
||||
* @param {number} width - The width.
|
||||
* @param {Array} rect - The annotation `Rect` entry.
|
||||
*/
|
||||
setWidth(width, rect = [0, 0, 0, 0]) {
|
||||
@ -642,7 +642,7 @@ class AnnotationBorderStyle {
|
||||
*
|
||||
* @public
|
||||
* @memberof AnnotationBorderStyle
|
||||
* @param {integer} radius - The horizontal corner radius
|
||||
* @param {number} radius - The horizontal corner radius.
|
||||
*/
|
||||
setHorizontalCornerRadius(radius) {
|
||||
if (Number.isInteger(radius)) {
|
||||
@ -655,7 +655,7 @@ class AnnotationBorderStyle {
|
||||
*
|
||||
* @public
|
||||
* @memberof AnnotationBorderStyle
|
||||
* @param {integer} radius - The vertical corner radius
|
||||
* @param {number} radius - The vertical corner radius.
|
||||
*/
|
||||
setVerticalCornerRadius(radius) {
|
||||
if (Number.isInteger(radius)) {
|
||||
|
@ -22,11 +22,11 @@ import { isDict, isName, isStream } from './primitives';
|
||||
* Resizes an RGB image with 3 components.
|
||||
* @param {TypedArray} src - The source buffer.
|
||||
* @param {TypedArray} dest - The destination buffer.
|
||||
* @param {Number} w1 - Original width.
|
||||
* @param {Number} h1 - Original height.
|
||||
* @param {Number} w2 - New width.
|
||||
* @param {Number} h2 - New height.
|
||||
* @param {Number} alpha01 - Size reserved for the alpha channel.
|
||||
* @param {number} w1 - Original width.
|
||||
* @param {number} h1 - Original height.
|
||||
* @param {number} w2 - New width.
|
||||
* @param {number} h2 - New height.
|
||||
* @param {number} alpha01 - Size reserved for the alpha channel.
|
||||
*/
|
||||
function resizeRgbImage(src, dest, w1, h1, w2, h2, alpha01) {
|
||||
const COMPONENTS = 3;
|
||||
@ -390,7 +390,7 @@ class ColorSpace {
|
||||
* This does not handle Lab, Indexed, or Pattern decode maps since they are
|
||||
* slightly different.
|
||||
* @param {Array} decode - Decode map (usually from an image).
|
||||
* @param {Number} numComps - Number of components the color space has.
|
||||
* @param {number} numComps - Number of components the color space has.
|
||||
*/
|
||||
static isDefaultDecode(decode, numComps) {
|
||||
if (!Array.isArray(decode)) {
|
||||
|
@ -95,7 +95,7 @@ const ROMAN_NUMBER_MAP = [
|
||||
|
||||
/**
|
||||
* Converts positive integers to (upper case) Roman numerals.
|
||||
* @param {integer} number - The number that should be converted.
|
||||
* @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.
|
||||
|
@ -49,11 +49,11 @@ var PDFImage = (function PDFImageClosure() {
|
||||
/**
|
||||
* Resizes an image mask with 1 component.
|
||||
* @param {TypedArray} src - The source buffer.
|
||||
* @param {Number} bpc - Number of bits per component.
|
||||
* @param {Number} w1 - Original width.
|
||||
* @param {Number} h1 - Original height.
|
||||
* @param {Number} w2 - New width.
|
||||
* @param {Number} h2 - New height.
|
||||
* @param {number} bpc - Number of bits per component.
|
||||
* @param {number} w1 - Original width.
|
||||
* @param {number} h1 - Original height.
|
||||
* @param {number} w2 - New width.
|
||||
* @param {number} h2 - New height.
|
||||
* @returns {TypedArray} The resized image mask buffer.
|
||||
*/
|
||||
function resizeImageMask(src, bpc, w1, h1, w2, h2) {
|
||||
|
@ -215,7 +215,7 @@ function parseQueryString(query) {
|
||||
* that if the condition is true for one item in the array, then it is also true
|
||||
* for all following items.
|
||||
*
|
||||
* @returns {Number} Index of the first array element to pass the test,
|
||||
* @returns {number} Index of the first array element to pass the test,
|
||||
* or |items.length| if no such element exists.
|
||||
*/
|
||||
function binarySearchFirstItem(items, condition) {
|
||||
|
Loading…
Reference in New Issue
Block a user