Skip to content

Commit 67d8fb8

Browse files
authored
Add FilterSpecification type
1 parent 3bf43ad commit 67d8fb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/source/geojson_source.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type Actor from '../util/actor.js';
1515
import type {Callback} from '../types/callback.js';
1616
import type {GeoJSONWorkerOptions} from './geojson_worker_source.js';
1717
import type {GeoJSON, GeoJSONFeature} from '@mapbox/geojson-types';
18-
import type {GeoJSONSourceSpecification, PromoteIdSpecification} from '../style-spec/types.js';
18+
import type {GeoJSONSourceSpecification, PromoteIdSpecification, FilterSpecification} from '../style-spec/types.js';
1919
import type {Cancelable} from '../types/cancelable.js';
2020

2121
/**
@@ -192,7 +192,7 @@ class GeoJSONSource extends Evented implements Source {
192192
/**
193193
* Sets filter for the GeoJSON data source and re-renders the map.
194194
*
195-
* @param {Array} filter An array for the filter expression.
195+
* @param {FilterSpecification} filter A FilterSpecification type for the filter expression.
196196
* @returns {GeoJSONSource} Returns itself to allow for method chaining.
197197
* @example
198198
* map.addSource('source_id', {
@@ -225,7 +225,7 @@ class GeoJSONSource extends Evented implements Source {
225225
* "Another Island"
226226
* ]);
227227
*/
228-
setFilter(filter: Array): this {
228+
setFilter(filter: ?FilterSpecification): this {
229229
this.workerOptions = extend({filter}, this.workerOptions);
230230
this._updateWorkerData();
231231
return this;

0 commit comments

Comments
 (0)