Improve some null types for strictNullChecks
This commit is contained in:
@@ -219,7 +219,7 @@ class Source extends BaseObject {
|
||||
/**
|
||||
* Turns the attributions option into an attributions function.
|
||||
* @param {AttributionLike|undefined} attributionLike The attribution option.
|
||||
* @return {?Attribution} An attribution function (or null).
|
||||
* @return {Attribution|null} An attribution function (or null).
|
||||
*/
|
||||
function adaptAttributions(attributionLike) {
|
||||
if (!attributionLike) {
|
||||
|
||||
@@ -293,7 +293,7 @@ class VectorSource extends Source {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Collection<import("../Feature.js").default<Geometry>>}
|
||||
* @type {Collection<import("../Feature.js").default<Geometry>>|null}
|
||||
*/
|
||||
this.featuresCollection_ = null;
|
||||
|
||||
@@ -683,7 +683,7 @@ class VectorSource extends Source {
|
||||
* Get the features collection associated with this source. Will be `null`
|
||||
* unless the source was configured with `useSpatialIndex` set to `false`, or
|
||||
* with an {@link module:ol/Collection} as `features`.
|
||||
* @return {Collection<import("../Feature.js").default<Geometry>>} The collection of features.
|
||||
* @return {Collection<import("../Feature.js").default<Geometry>>|null} The collection of features.
|
||||
* @api
|
||||
*/
|
||||
getFeaturesCollection() {
|
||||
|
||||
@@ -367,7 +367,7 @@ export default WMTS;
|
||||
* - format - {string} Image format for the layer. Default is the first
|
||||
* format returned in the GetCapabilities response.
|
||||
* - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.
|
||||
* @return {?Options} WMTS source options object or `null` if the layer was not found.
|
||||
* @return {Options|null} WMTS source options object or `null` if the layer was not found.
|
||||
* @api
|
||||
*/
|
||||
export function optionsFromCapabilities(wmtsCap, config) {
|
||||
|
||||
Reference in New Issue
Block a user