TypeStat
TypeStat copied to clipboard
Bug: previous type annotation is not replaced
🐛 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.
I just tried ts-fix and that also misplaced some return type annotations in a similar fashion. I'm guessing the cause is some underlying bug with the line/column start/end information for some tokens.