Fix some types

This commit is contained in:
ahocevar
2018-04-27 00:26:03 +02:00
parent ce84c3bf57
commit 59d904e509
25 changed files with 103 additions and 102 deletions
+14 -2
View File
@@ -7,6 +7,18 @@ import CircleStyle from '../style/Circle.js';
import Fill from '../style/Fill.js';
import Stroke from '../style/Stroke.js';
/**
* A function that takes an {@link module:ol/Feature} and a `{number}`
* representing the view's resolution. The function should return a
* {@link module:ol/style/Style} or an array of them. This way e.g. a
* vector layer can be styled.
*
* @typedef {function((module:ol/Feature|module:ol/render/Feature), number):
* (module:ol/style/Style|Array.<module:ol/style/Style>)} Function
*/
/**
* A function that takes an {@link module:ol/Feature} as argument and returns an
* {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.
@@ -312,9 +324,9 @@ Style.prototype.setZIndex = function(zIndex) {
* Convert the provided object into a style function. Functions passed through
* unchanged. Arrays of module:ol/style/Style or single style objects wrapped in a
* new style function.
* @param {module:ol/style~StyleFunction|Array.<module:ol/style/Style>|module:ol/style/Style} obj
* @param {module:ol/style/Style~Function|Array.<module:ol/style/Style>|module:ol/style/Style} obj
* A style function, a single style, or an array of styles.
* @return {module:ol/style~StyleFunction} A style function.
* @return {module:ol/style/Style~Function} A style function.
*/
export function toFunction(obj) {
let styleFunction;