From 7ad70d6710cf71a4980577011914683d536045b8 Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Sat, 19 Oct 2024 15:25:26 +0200 Subject: [PATCH] style: fix type errors --- javascript/components/HeadingIndicator.tsx | 1 - javascript/types/png.d.ts | 1 + packages/examples/src/examples/Annotations/CustomCallout.tsx | 1 - packages/examples/src/examples/Map/ShowMap.tsx | 2 +- packages/examples/src/types/png.d.ts | 1 + 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 javascript/types/png.d.ts create mode 100644 packages/examples/src/types/png.d.ts diff --git a/javascript/components/HeadingIndicator.tsx b/javascript/components/HeadingIndicator.tsx index 068e77137..4e4d84792 100644 --- a/javascript/components/HeadingIndicator.tsx +++ b/javascript/components/HeadingIndicator.tsx @@ -1,7 +1,6 @@ import React, { ReactElement } from "react"; import SymbolLayer from "./SymbolLayer"; -// @ts-ignore import headingIcon from "../../assets/heading.png"; import BaseProps from "../types/BaseProps"; diff --git a/javascript/types/png.d.ts b/javascript/types/png.d.ts new file mode 100644 index 000000000..49977505d --- /dev/null +++ b/javascript/types/png.d.ts @@ -0,0 +1 @@ +declare module "*.png"; diff --git a/packages/examples/src/examples/Annotations/CustomCallout.tsx b/packages/examples/src/examples/Annotations/CustomCallout.tsx index a36e103f8..2451e429e 100644 --- a/packages/examples/src/examples/Annotations/CustomCallout.tsx +++ b/packages/examples/src/examples/Annotations/CustomCallout.tsx @@ -3,7 +3,6 @@ import { Feature } from "@turf/helpers/dist/js"; import React, { FC, useState, ReactElement } from "react"; import { View, Text, ViewStyle, StyleProp, TextStyle } from "react-native"; -// @ts-ignore import exampleIcon from "../../assets/pin.png"; import sheet from "../../styles/sheet"; import Page from "../common/Page"; diff --git a/packages/examples/src/examples/Map/ShowMap.tsx b/packages/examples/src/examples/Map/ShowMap.tsx index ca0f14658..2ea666683 100755 --- a/packages/examples/src/examples/Map/ShowMap.tsx +++ b/packages/examples/src/examples/Map/ShowMap.tsx @@ -28,7 +28,7 @@ const ShowMap = (): ReactElement => { const onMapChange = ( index: number, - newStyleURL: MapLibreGL.StyleURL, + newStyleURL: typeof MapLibreGL.StyleURL, ): void => { setStyleURL({ styleURL: newStyleURL }); }; diff --git a/packages/examples/src/types/png.d.ts b/packages/examples/src/types/png.d.ts new file mode 100644 index 000000000..49977505d --- /dev/null +++ b/packages/examples/src/types/png.d.ts @@ -0,0 +1 @@ +declare module "*.png";