Skip to content

Commit 74424d2

Browse files
Ruschiostepankuzmin
authored andcommitted
Add FilterSpecification type
1 parent ab05d71 commit 74424d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/source/geojson_source.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type Tile from './tile';
1111
import type Actor from '../util/actor';
1212
import type {Callback} from '../types/callback';
1313
import type {GeoJSONWorkerOptions} from './geojson_worker_source';
14-
import type {GeoJSONSourceSpecification, PromoteIdSpecification} from '../style-spec/types';
14+
import type {GeoJSONSourceSpecification, PromoteIdSpecification, FilterSpecification} from '../style-spec/types';
1515
import type {Cancelable} from '../types/cancelable';
1616

1717
/**
@@ -256,7 +256,7 @@ class GeoJSONSource extends Evented<SourceEvents> implements ISource {
256256
/**
257257
* Sets filter for the GeoJSON data source and re-renders the map.
258258
*
259-
* @param {Array} filter An array for the filter expression.
259+
* @param {FilterSpecification} filter A FilterSpecification type for the filter expression.
260260
* @returns {GeoJSONSource} Returns itself to allow for method chaining.
261261
* @example
262262
* map.addSource('source_id', {
@@ -289,7 +289,7 @@ class GeoJSONSource extends Evented<SourceEvents> implements ISource {
289289
* "Another Island"
290290
* ]);
291291
*/
292-
setFilter(filter: Array): this {
292+
setFilter(filter: ?FilterSpecification): this {
293293
this.workerOptions = extend({filter}, this.workerOptions);
294294
this._updateWorkerData();
295295
return this;

0 commit comments

Comments
 (0)