Skip to content

Commit

Permalink
Add FilterSpecification type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruschio authored Dec 26, 2023
1 parent 3bf43ad commit 67d8fb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/source/geojson_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type Actor from '../util/actor.js';
import type {Callback} from '../types/callback.js';
import type {GeoJSONWorkerOptions} from './geojson_worker_source.js';
import type {GeoJSON, GeoJSONFeature} from '@mapbox/geojson-types';
import type {GeoJSONSourceSpecification, PromoteIdSpecification} from '../style-spec/types.js';
import type {GeoJSONSourceSpecification, PromoteIdSpecification, FilterSpecification} from '../style-spec/types.js';
import type {Cancelable} from '../types/cancelable.js';

/**
Expand Down Expand Up @@ -192,7 +192,7 @@ class GeoJSONSource extends Evented implements Source {
/**
* Sets filter for the GeoJSON data source and re-renders the map.
*
* @param {Array} filter An array for the filter expression.
* @param {FilterSpecification} filter A FilterSpecification type for the filter expression.
* @returns {GeoJSONSource} Returns itself to allow for method chaining.
* @example
* map.addSource('source_id', {
Expand Down Expand Up @@ -225,7 +225,7 @@ class GeoJSONSource extends Evented implements Source {
* "Another Island"
* ]);
*/
setFilter(filter: Array): this {
setFilter(filter: ?FilterSpecification): this {
this.workerOptions = extend({filter}, this.workerOptions);
this._updateWorkerData();
return this;
Expand Down

0 comments on commit 67d8fb8

Please sign in to comment.