From c33c8847ff7541295a1e102ff7ea482786f74d38 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 15 Oct 2021 09:32:36 -0400 Subject: [PATCH] Fix example build --- examples/advanced/src/example.tsx | 2 +- modules/edit-modes/src/lib/rotate-mode.ts | 3 +-- modules/edit-modes/src/lib/scale-mode.ts | 3 +-- package.json | 1 + tsconfig.json | 2 +- yarn.lock | 7 +++++++ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/advanced/src/example.tsx b/examples/advanced/src/example.tsx index d1b10e463..633256279 100644 --- a/examples/advanced/src/example.tsx +++ b/examples/advanced/src/example.tsx @@ -919,10 +919,10 @@ export default class Example extends React.Component< }); } - // @ts-expect-error expected 0 arguments, but got 1 const editableGeoJsonLayer = new EditableGeoJsonLayer({ id: 'geojson', data: testFeatures, + // @ts-expect-error :(() selectedFeatureIndexes, mode, modeConfig, diff --git a/modules/edit-modes/src/lib/rotate-mode.ts b/modules/edit-modes/src/lib/rotate-mode.ts index f7c7be6b4..8c760b2bf 100644 --- a/modules/edit-modes/src/lib/rotate-mode.ts +++ b/modules/edit-modes/src/lib/rotate-mode.ts @@ -31,8 +31,7 @@ export class RotateMode extends GeoJsonEditMode { _isSinglePointGeometrySelected = (geometry: FeatureCollection | null | undefined): boolean => { const { features } = geometry || {}; if (Array.isArray(features) && features.length === 1) { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'Feature' is not assignable to pa... Remove this comment to see the full error message - const { type } = getGeom(features[0]); + const { type } = getGeom(features[0]); return type === 'Point'; } return false; diff --git a/modules/edit-modes/src/lib/scale-mode.ts b/modules/edit-modes/src/lib/scale-mode.ts index 991e80c61..5465f517f 100644 --- a/modules/edit-modes/src/lib/scale-mode.ts +++ b/modules/edit-modes/src/lib/scale-mode.ts @@ -33,8 +33,7 @@ export class ScaleMode extends GeoJsonEditMode { _isSinglePointGeometrySelected = (geometry: FeatureCollection | null | undefined): boolean => { const { features } = geometry || {}; if (Array.isArray(features) && features.length === 1) { - // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'Feature' is not assignable to pa... Remove this comment to see the full error message - const { type } = getGeom(features[0]); + const { type } = getGeom(features[0]); return type === 'Point'; } return false; diff --git a/package.json b/package.json index 06b44c4a4..7cc5fc497 100644 --- a/package.json +++ b/package.json @@ -122,6 +122,7 @@ } }, "dependencies": { + "@deck.gl/extensions": "^8.6.0", "tslib": "^2.3.1" } } diff --git a/tsconfig.json b/tsconfig.json index 71ec2ed77..41a8ea7a8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,7 +20,7 @@ "noUnusedLocals": true, "moduleResolution": "node", "jsx": "react", - "target": "es5", + "target": "es6", "sourceMap": true, "importHelpers": true, "types": [] diff --git a/yarn.lock b/yarn.lock index bff359613..0d53df050 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1465,6 +1465,13 @@ mjolnir.js "^2.5.0" probe.gl "^3.4.0" +"@deck.gl/extensions@^8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@deck.gl/extensions/-/extensions-8.6.0.tgz#0e124c1a4c20814765e387415047789d841bf5b4" + integrity sha512-uLdKPtcMxZdEIYcVc+9FKh5jgTlolaqJv0gmQtplYgt4ROfZGJoEgy29tZwFZUlF+9QdlsB2U26IRfquD0r5mQ== + dependencies: + "@luma.gl/shadertools" "^8.5.10" + "@deck.gl/geo-layers@^8.6.0": version "8.6.0" resolved "https://registry.yarnpkg.com/@deck.gl/geo-layers/-/geo-layers-8.6.0.tgz#4e77e75569746ac23bc63c2c9559e04022979951"