enable check-types
This commit is contained in:
@@ -6,7 +6,7 @@ const path = require('path');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Publish hook for the JSDoc template. Writes to JSON stdout.
|
* Publish hook for the JSDoc template. Writes to JSON stdout.
|
||||||
* @param {function} data The root of the Taffy DB containing doclet records.
|
* @param {Function} data The root of the Taffy DB containing doclet records.
|
||||||
* @param {Object} opts Options.
|
* @param {Object} opts Options.
|
||||||
* @return {Promise} A promise that resolves when writing is complete.
|
* @return {Promise} A promise that resolves when writing is complete.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -274,9 +274,9 @@ export function expressionToGlsl(context, value, typeHint) {
|
|||||||
(valueType & ValueTypes.COLOR) > 0 &&
|
(valueType & ValueTypes.COLOR) > 0 &&
|
||||||
(typeHint === undefined || typeHint == ValueTypes.COLOR)
|
(typeHint === undefined || typeHint == ValueTypes.COLOR)
|
||||||
) {
|
) {
|
||||||
return colorToGlsl(/** @type {number[]|string} */ (value));
|
return colorToGlsl(/** @type {Array<number> | string} */ (value));
|
||||||
} else if ((valueType & ValueTypes.NUMBER_ARRAY) > 0) {
|
} else if ((valueType & ValueTypes.NUMBER_ARRAY) > 0) {
|
||||||
return arrayToGlsl(/** @type {number[]} */ (value));
|
return arrayToGlsl(/** @type {Array<number>} */ (value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -652,7 +652,7 @@ Operators['color'] = {
|
|||||||
assertArgsMinCount(args, 3);
|
assertArgsMinCount(args, 3);
|
||||||
assertArgsMaxCount(args, 4);
|
assertArgsMaxCount(args, 4);
|
||||||
assertNumbers(args);
|
assertNumbers(args);
|
||||||
const array = /** @type {number[]} */ (args);
|
const array = /** @type {Array<number>} */ (args);
|
||||||
if (args.length === 3) {
|
if (args.length === 3) {
|
||||||
array.push(1);
|
array.push(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,8 +63,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert value is within some tolerance of a number.
|
* Assert value is within some tolerance of a number.
|
||||||
* @param {Number} n Number.
|
* @param {number} n Number.
|
||||||
* @param {Number} tol Tolerance.
|
* @param {number} tol Tolerance.
|
||||||
* @return {expect.Assertion} The assertion.
|
* @return {expect.Assertion} The assertion.
|
||||||
*/
|
*/
|
||||||
expect.Assertion.prototype.roughlyEqual = function (n, tol) {
|
expect.Assertion.prototype.roughlyEqual = function (n, tol) {
|
||||||
@@ -455,7 +455,7 @@
|
|||||||
* @param {ol.PluggableMap} map A map using the canvas renderer.
|
* @param {ol.PluggableMap} map A map using the canvas renderer.
|
||||||
* @param {string} referenceImage Path to the reference image.
|
* @param {string} referenceImage Path to the reference image.
|
||||||
* @param {number} tolerance The accepted mismatch tolerance.
|
* @param {number} tolerance The accepted mismatch tolerance.
|
||||||
* @param {function} done A callback to indicate that the test is done.
|
* @param {Function} done A callback to indicate that the test is done.
|
||||||
*/
|
*/
|
||||||
global.expectResemble = function (map, referenceImage, tolerance, done) {
|
global.expectResemble = function (map, referenceImage, tolerance, done) {
|
||||||
map.render();
|
map.render();
|
||||||
|
|||||||
Reference in New Issue
Block a user