From 35ea2c5e4cc290fed1103dae8de7062c415ac5ad Mon Sep 17 00:00:00 2001 From: Cody Ebberson Date: Wed, 7 Jan 2015 10:58:05 -0800 Subject: [PATCH] Fixed incorrect or missing jsdoc annotations --- io/loader.js | 3 ++- io/parserLUT.js | 2 +- io/parserMRC.js | 2 +- io/parserNII.js | 4 ++-- io/parserVTK.js | 2 +- lib/zlib.js/gunzip.js | 2 +- lib/zlib.js/rawdeflate.js | 4 ++-- visualization/camera3D.js | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/io/loader.js b/io/loader.js index 5c96b8551..589784c8f 100644 --- a/io/loader.js +++ b/io/loader.js @@ -355,7 +355,8 @@ X.loader.prototype.failed = function(request, container, object) { /** * Supported data types by extension. * - * @enum {Array} + * @const + * @type {Object.} */ X.loader.extensions = { // support for the following extensions and the mapping to X.parsers as well diff --git a/io/parserLUT.js b/io/parserLUT.js index 30734fc1c..a9564455d 100644 --- a/io/parserLUT.js +++ b/io/parserLUT.js @@ -102,7 +102,7 @@ X.parserLUT.prototype.parse = function(container, object, data, flag) { } // split each line - var lineFields = line.split(' '); + var lineFields = /** @type {Array} */ (line.split(' ')); // filter out multiple blanks lineFields = lineFields.filter(function(v) { diff --git a/io/parserMRC.js b/io/parserMRC.js index e33df6dc7..77dd342c1 100644 --- a/io/parserMRC.js +++ b/io/parserMRC.js @@ -30,7 +30,7 @@ X.parserMRC = function() { // // class attributes - /* + /** * @inheritDoc * @const */ diff --git a/io/parserNII.js b/io/parserNII.js index f95422b87..824b41e14 100644 --- a/io/parserNII.js +++ b/io/parserNII.js @@ -85,7 +85,7 @@ X.parserNII.prototype.parse = function(container, object, data, flag) { _data = inflate.decompress(); // .. and use the underlying array buffer - _data = _data.buffer; + _data = /** @type {!ArrayBuffer} */ (_data.buffer); // check endianness if (!this.verifyNII(_data)) { @@ -99,7 +99,7 @@ X.parserNII.prototype.parse = function(container, object, data, flag) { } // parse the byte stream - var MRI = this.parseStream(_data); + var MRI = this.parseStream(/** @type {!ArrayBuffer} */ (_data)); // grab the min, max intensities var min = MRI.min; diff --git a/io/parserVTK.js b/io/parserVTK.js index 7e807f571..19428d06f 100644 --- a/io/parserVTK.js +++ b/io/parserVTK.js @@ -127,7 +127,7 @@ X.parserVTK.prototype.parse = function(container, object, data, flag) { // This uses an optimized loop. // - /* + /** * Fast Duff's Device * * @author Miller Medeiros diff --git a/lib/zlib.js/gunzip.js b/lib/zlib.js/gunzip.js index 0515d2d60..a9944abb7 100644 --- a/lib/zlib.js/gunzip.js +++ b/lib/zlib.js/gunzip.js @@ -69,7 +69,7 @@ Zlib.Gunzip.prototype.decompress = function() { this.decodeMember(); } - return this.concatMember(); + return /** @type {!(Array.|Uint8Array)} */ (this.concatMember()); }; /** diff --git a/lib/zlib.js/rawdeflate.js b/lib/zlib.js/rawdeflate.js index 1bf271209..253818b01 100644 --- a/lib/zlib.js/rawdeflate.js +++ b/lib/zlib.js/rawdeflate.js @@ -687,11 +687,11 @@ Zlib.RawDeflate.prototype.lz77 = function(dataArray) { var il; /** @type {number} chained-hash-table key */ var matchKey; - /** @type {Object.>>} chained-hash-table */ + /** @type {Object.>} chained-hash-table */ var table = {}; /** @const @type {number} */ var windowSize = Zlib.RawDeflate.WindowSize; - /** @type {Array.>} match list */ + /** @type {Array.} match list */ var matchList; /** @type {Zlib.RawDeflate.Lz77Match} longest match */ var longestMatch; diff --git a/visualization/camera3D.js b/visualization/camera3D.js index 9b0b56273..c7d593314 100644 --- a/visualization/camera3D.js +++ b/visualization/camera3D.js @@ -71,7 +71,7 @@ X.camera3D = function(width, height) { /** * The perspective matrix. * - * @type {Array.|Float32Array|Float64Array|null} + * @type {!Array.|!Float32Array|!Float64Array} * @protected */ this._perspective = X.matrix.makePerspective(X.matrix.identity(), this._fieldOfView, (width/height), 1, 10000);