Merge pull request #8203 from ahocevar/typechecking-complete

Type checking complete
This commit is contained in:
Andreas Hocevar
2018-05-18 08:24:01 -05:00
committed by GitHub
6 changed files with 11 additions and 22 deletions
+4 -4
View File
@@ -390,9 +390,9 @@ const PluggableMap = function(options) {
* @param {module:ol/control/Control} control Control. * @param {module:ol/control/Control} control Control.
* @this {module:ol/PluggableMap} * @this {module:ol/PluggableMap}
*/ */
function(control) { (function(control) {
control.setMap(this); control.setMap(this);
}.bind(this)); }).bind(this));
listen(this.controls, CollectionEventType.ADD, listen(this.controls, CollectionEventType.ADD,
/** /**
@@ -415,9 +415,9 @@ const PluggableMap = function(options) {
* @param {module:ol/interaction/Interaction} interaction Interaction. * @param {module:ol/interaction/Interaction} interaction Interaction.
* @this {module:ol/PluggableMap} * @this {module:ol/PluggableMap}
*/ */
function(interaction) { (function(interaction) {
interaction.setMap(this); interaction.setMap(this);
}.bind(this)); }).bind(this));
listen(this.interactions, CollectionEventType.ADD, listen(this.interactions, CollectionEventType.ADD,
/** /**
+2 -2
View File
@@ -151,9 +151,9 @@ const OverviewMap = function(opt_options) {
/** /**
* @param {module:ol/layer/Layer} layer Layer. * @param {module:ol/layer/Layer} layer Layer.
*/ */
function(layer) { (function(layer) {
ovmap.addLayer(layer); ovmap.addLayer(layer);
}.bind(this)); }).bind(this));
} }
const box = document.createElement('DIV'); const box = document.createElement('DIV');
-5
View File
@@ -232,11 +232,6 @@ function createStyleDefaults() {
zIndex: 0 zIndex: 0
}); });
/**
* @const
* @type {Array.<module:ol/style/Style>}
* @private
*/
DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE]; DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE];
} }
-6
View File
@@ -83,12 +83,6 @@ import {add as addTransformFunc, clear as clearTransformFuncs, get as getTransfo
*/ */
/**
* Meters per unit lookup table.
* @const
* @type {Object.<module:ol/proj/Units, number>}
* @api
*/
export {METERS_PER_UNIT}; export {METERS_PER_UNIT};
+2 -2
View File
@@ -130,14 +130,14 @@ const WebGLMapRenderer = function(map) {
* @return {number} Priority. * @return {number} Priority.
* @this {module:ol/renderer/webgl/Map} * @this {module:ol/renderer/webgl/Map}
*/ */
function(element) { (function(element) {
const tileCenter = /** @type {module:ol/coordinate~Coordinate} */ (element[1]); const tileCenter = /** @type {module:ol/coordinate~Coordinate} */ (element[1]);
const tileResolution = /** @type {number} */ (element[2]); const tileResolution = /** @type {number} */ (element[2]);
const deltaX = tileCenter[0] - this.focus_[0]; const deltaX = tileCenter[0] - this.focus_[0];
const deltaY = tileCenter[1] - this.focus_[1]; const deltaY = tileCenter[1] - this.focus_[1];
return 65536 * Math.log(tileResolution) + return 65536 * Math.log(tileResolution) +
Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution; Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;
}.bind(this), }).bind(this),
/** /**
* @param {Array.<*>} element Element. * @param {Array.<*>} element Element.
* @return {string} Key. * @return {string} Key.
+3 -3
View File
@@ -3,6 +3,7 @@ const Compiler = require('google-closure-compiler').compiler;
const compiler = new Compiler({ const compiler = new Compiler({
js: [ js: [
'./build/src-closure/**.js', './build/src-closure/**.js',
// Resolve dependencies
'./node_modules/pbf/package.json', './node_modules/pbf/**.js', './node_modules/ieee754/**.js', './node_modules/pbf/package.json', './node_modules/pbf/**.js', './node_modules/ieee754/**.js',
'./node_modules/pixelworks/package.json', './node_modules/pixelworks/**.js', './node_modules/pixelworks/package.json', './node_modules/pixelworks/**.js',
'./node_modules/rbush/package.json', './node_modules/rbush/**.js', 'node_modules/quickselect/**.js' './node_modules/rbush/package.json', './node_modules/rbush/**.js', 'node_modules/quickselect/**.js'
@@ -10,11 +11,10 @@ const compiler = new Compiler({
entry_point: './build/src-closure/index.js', entry_point: './build/src-closure/index.js',
module_resolution: 'NODE', module_resolution: 'NODE',
dependency_mode: 'STRICT', dependency_mode: 'STRICT',
process_common_js_modules: true,
checks_only: true, checks_only: true,
//FIXME Change newCheckTypes to jscomp_error when we have path types everywhere jscomp_error: ['newCheckTypes'],
jscomp_warning: ['newCheckTypes'],
// Options to make dependencies work // Options to make dependencies work
process_common_js_modules: true,
hide_warnings_for: 'node_modules' hide_warnings_for: 'node_modules'
}); });