From fe60d07ef0980bcd3e67590b56ea0016c93b38b9 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 4 Apr 2014 07:03:58 -0600 Subject: [PATCH] Externs lint --- externs/bootstrap.js | 9 ++++----- externs/closure-compiler.js | 16 ++++++++++++++++ externs/oli.js | 2 ++ externs/proj4js.js | 2 +- externs/vbarray.js | 5 +++-- externs/webgl-debug.js | 15 ++++++++++----- 6 files changed, 36 insertions(+), 13 deletions(-) diff --git a/externs/bootstrap.js b/externs/bootstrap.js index 442377e4ca..7d2d429a89 100644 --- a/externs/bootstrap.js +++ b/externs/bootstrap.js @@ -6,16 +6,15 @@ */ - /** - * @param {string|Object.=} option + * @param {string|Object.=} opt_option * @return {!jQuery} */ -jQuery.prototype.popover = function(option) {}; +jQuery.prototype.popover = function(opt_option) {}; /** - * @param {string|Object.=} option + * @param {string|Object.=} opt_option * @return {!jQuery} */ -jQuery.prototype.tooltip = function(option) {}; +jQuery.prototype.tooltip = function(opt_option) {}; diff --git a/externs/closure-compiler.js b/externs/closure-compiler.js index eadd9ab7cf..a7bd61fd62 100644 --- a/externs/closure-compiler.js +++ b/externs/closure-compiler.js @@ -10,30 +10,37 @@ // @see https://code.google.com/p/closure-compiler/issues/detail?id=1060 + /** @type {Date} */ HTMLInputElement.prototype.valueAsDate; + /** @type {number} */ HTMLInputElement.prototype.valueAsNumber; // @see https://code.google.com/p/closure-compiler/issues/detail?id=1084 + /** @type {?number} */ DeviceRotationRate.prototype.alpha; + /** @type {?number} */ DeviceRotationRate.prototype.beta; + /** @type {?number} */ DeviceRotationRate.prototype.gamma; // @see https://code.google.com/p/closure-compiler/issues/detail?id=1088 + /** @type {?number} */ DeviceOrientationEvent.prototype.webkitCompassAccuracy; + /** @type {?number} */ DeviceOrientationEvent.prototype.webkitCompassHeading; @@ -41,15 +48,19 @@ DeviceOrientationEvent.prototype.webkitCompassHeading; // IE 11 fullscreen API // http://msdn.microsoft.com/en-us/library/ie/dn265028(v=vs.85).aspx + /** @return {void} */ Element.prototype.msRequestFullscreen = function() {}; + /** @return {void} */ Element.prototype.msExitFullscreen = function() {}; + /** @type {boolean} */ Document.prototype.msFullscreenEnabled; + /** @type {Element} */ Document.prototype.msFullscreenElement; @@ -57,17 +68,22 @@ Document.prototype.msFullscreenElement; /** @type {number} */ Touch.prototype.force; + /** @type {number} */ Touch.prototype.radiusX; + /** @type {number} */ Touch.prototype.radiusY; + /** @type {number} */ Touch.prototype.webkitForce; + /** @type {number} */ Touch.prototype.webkitRadiusX; + /** @type {number} */ Touch.prototype.webkitRadiusY; diff --git a/externs/oli.js b/externs/oli.js index 51e181fc27..457d1921d6 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -36,6 +36,7 @@ oli.DrawEvent; oli.DrawEvent.prototype.feature; + /** @interface */ oli.FrameState; @@ -120,6 +121,7 @@ oli.FrameState.prototype.viewHints; oli.FrameState.prototype.wantedTiles; + /** @interface */ oli.ObjectEvent; diff --git a/externs/proj4js.js b/externs/proj4js.js index b12d7ef13e..d91a06b561 100644 --- a/externs/proj4js.js +++ b/externs/proj4js.js @@ -89,4 +89,4 @@ Proj4js.Proj.prototype.to_meter; * @param {Proj4js.Point|{x:number, y:number}} point * @return {Proj4js.Point} */ -Proj4js.transform = function(source, dest, point) {}; +Proj4js.transform = function(source, dest, point) {return null;}; diff --git a/externs/vbarray.js b/externs/vbarray.js index 671030db8a..ae2085e190 100644 --- a/externs/vbarray.js +++ b/externs/vbarray.js @@ -4,6 +4,7 @@ */ + /** * FIXME check argument type * @constructor @@ -15,7 +16,7 @@ var VBArray = function(safeArray) {}; /** * @return {number} */ -VBArray.prototype.dimensions = function() {}; +VBArray.prototype.dimensions = function() {return 0;}; /** @@ -35,7 +36,7 @@ VBArray.prototype.lbound = function(opt_dimension) {}; /** * @return {Array.} */ -VBArray.prototype.toArray = function() {}; +VBArray.prototype.toArray = function() {return null;}; /** diff --git a/externs/webgl-debug.js b/externs/webgl-debug.js index 9f5803831c..43e10ac02d 100644 --- a/externs/webgl-debug.js +++ b/externs/webgl-debug.js @@ -25,7 +25,8 @@ var WebGLDebugLostContextSimulatingCanvas = function() {}; * @nosideeffects * @return {number} */ -WebGLDebugLostContextSimulatingCanvas.prototype.getNumCalls = function() {}; +WebGLDebugLostContextSimulatingCanvas.prototype.getNumCalls = + function() {return NaN;}; /** @@ -63,7 +64,7 @@ var WebGLDebugUtils = {}; * @param {number} value * @return {string} */ -WebGLDebugUtils.glEnumToString = function(value) {}; +WebGLDebugUtils.glEnumToString = function(value) {return '';}; /** @@ -72,7 +73,9 @@ WebGLDebugUtils.glEnumToString = function(value) {}; * @param {Array} args Args. * @return {string} String. */ -WebGLDebugUtils.glFunctionArgsToString = function(functionName, args) {}; +WebGLDebugUtils.glFunctionArgsToString = function(functionName, args) { + return ''; +}; /** @@ -85,7 +88,9 @@ WebGLDebugUtils.init = function(ctx) {}; * @param {HTMLCanvasElement} canvas * @return {WebGLDebugLostContextSimulatingCanvas} */ -WebGLDebugUtils.makeLostContextSimulatingCanvas = function(canvas) {}; +WebGLDebugUtils.makeLostContextSimulatingCanvas = function(canvas) { + return null; +}; /** @@ -95,4 +100,4 @@ WebGLDebugUtils.makeLostContextSimulatingCanvas = function(canvas) {}; * @return {WebGLDebugRenderingContext} */ WebGLDebugUtils.makeDebugContext = - function(context, opt_onErrorFunc, opt_onFunc) {}; + function(context, opt_onErrorFunc, opt_onFunc) {return null;};