From 3d0805a590d340adb9eb2a91ed6ca538eb337ed0 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Fri, 28 Jun 2024 11:52:10 -0400 Subject: [PATCH] Clean up --- examples/01-pure-js/pure-js.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/01-pure-js/pure-js.ts b/examples/01-pure-js/pure-js.ts index 19be4b6..3b68d47 100644 --- a/examples/01-pure-js/pure-js.ts +++ b/examples/01-pure-js/pure-js.ts @@ -2,13 +2,12 @@ import maplibregl from 'maplibre-gl'; import {Deck} from '@deck.gl/core'; import {VectorTileLayer} from '@deck.gl/carto'; import { - FilterEvent, Filter, vectorTableSource, VectorTableSourceResponse, } from '@carto/api-client'; import '../components/index.js'; -import type {Widget} from '../components/index.js'; +import type {Widget, FilterEvent} from '../components/index.js'; /************************************************************************** * REACTIVE STATE @@ -100,8 +99,8 @@ function updateWidgets() { function bindWidget(selector: string): Widget { const widget = document.querySelector(selector)!; - widget.addEventListener('filter', (event: FilterEvent) => { - filters = event.detail.filters; + widget.addEventListener('filter', (event) => { + filters = (event as FilterEvent).detail.filters; updateSources(); });