From ecd6d89d4a0a97f7678fd277ff50f299fe5759e6 Mon Sep 17 00:00:00 2001 From: A-Behairi Date: Thu, 20 Jun 2024 09:35:02 +0200 Subject: [PATCH] fix: resolve type `Geometry` from `@types/geojson` instead of `@turf` --- elements/itemfilter/package.json | 1 + elements/itemfilter/src/filters/spatial.ts | 2 +- package-lock.json | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/elements/itemfilter/package.json b/elements/itemfilter/package.json index 10963894a..0ada63acc 100644 --- a/elements/itemfilter/package.json +++ b/elements/itemfilter/package.json @@ -4,6 +4,7 @@ "type": "module", "devDependencies": { "@eox/eslint-config": "^1.0.0", + "@types/geojson": "^7946.0.14", "@types/lodash.debounce": "^4.0.7", "@typescript-eslint/eslint-plugin": "^7.0.1", "@typescript-eslint/parser": "^7.0.1", diff --git a/elements/itemfilter/src/filters/spatial.ts b/elements/itemfilter/src/filters/spatial.ts index 88ff5f3a3..f390f3682 100644 --- a/elements/itemfilter/src/filters/spatial.ts +++ b/elements/itemfilter/src/filters/spatial.ts @@ -4,7 +4,7 @@ import { map } from "lit/directives/map.js"; import { when } from "lit/directives/when.js"; import { booleanIntersects } from "@turf/boolean-intersects"; import { booleanWithin } from "@turf/boolean-within"; -import { Geometry } from "@turf/helpers"; +import type { Geometry } from "geojson"; import { EOxMap } from "../../../map/main"; import { resetFilter } from "../reset"; import { EoxLayer } from "../../../map/src/generate"; diff --git a/package-lock.json b/package-lock.json index 47a9b8dd7..d5b13a277 100644 --- a/package-lock.json +++ b/package-lock.json @@ -113,6 +113,7 @@ }, "devDependencies": { "@eox/eslint-config": "^1.0.0", + "@types/geojson": "^7946.0.14", "@types/lodash.debounce": "^4.0.7", "@typescript-eslint/eslint-plugin": "^7.0.1", "@typescript-eslint/parser": "^7.0.1", @@ -5637,6 +5638,13 @@ "integrity": "sha512-frsJrz2t/CeGifcu/6uRo4b+SzAwT4NYCVPu1GN8IB9XTzrpPkGuV0tmh9mN+/L0PklAlsC3u5Fxt0ju00LXIw==", "dev": true }, + "node_modules/@types/geojson": { + "version": "7946.0.14", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", + "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/hast": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",