Skip to content

Bug: previous type annotation is not replacedΒ #2018

@pjonsson

Description

@pjonsson

πŸ› Bug Report

  • TypeStat version: 0.8.1
  • TypeScript version: 5.2
  • Node version: 20

Actual Behavior

diff --git a/lib/ReactViews/Tools/DiffTool/DiffTool.tsx b/lib/ReactViews/Tools/DiffTool/DiffTool.tsx
index 79c9e6e0c..f52735a8b 100644
--- a/lib/ReactViews/Tools/DiffTool/DiffTool.tsx
+++ b/lib/ReactViews/Tools/DiffTool/DiffTool.tsx
@@ -890,7 +890,7 @@ const Selector = (props: any) => (

 const AreaFilterSelection = (props: {
   t: TFunction;
-  location?: LatLonHeight;
+  location?: LatLonHeight | number;
   isPickingNewLocation: boolean;
   theme?: any;
 }) => {
@@ -969,7 +969,12 @@ const LocationAndDatesDisplayBox = styled(Box).attrs({
   }
 `;

-const LegendImage = function (props: any) {
+interface LegendImageProps {
+width: string;
+src: string;
+}
+
+const LegendImage = function (props: any: LegendImageProps) {
   return (
     <img
       {...props}

Expected Behavior

I would expect const LegendImage = function (props: any) { to become const LegendImage = function (props: LegendImageProps) {.

Reproduction

Same as #2014.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: fixersAround how TypeStat fixes code.status: accepting prsPlease, send a pull request to resolve this! πŸ™type: bugSomething isn't working :( πŸ›

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions