JoshuaKGoldberg / JoshuaKGoldberg/TypeStat

Bug: mangled export by incompleteTypes fix in terrariajs

Open
#2,016 0 comments 0 reactions 0 assignees View on GitHub
status: accepting prs type: bug
Dominant language
TypeScript
Stars
2.3k
Forks
47
Avg merge
15h 55m
Merged PRs (30d)
21

Description

### 🐛 Bug Report

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

#### Actual Behavior

```patch
diff --git a/lib/ReactViews/Context/ViewStateContext.tsx b/lib/ReactViews/Context/ViewStateContext.tsx
index 951d9fd05..06acf5bf0 100644
--- a/lib/ReactViews/Context/ViewStateContext.tsx
+++ b/lib/ReactViews/Context/ViewStateContext.tsx
@@ -20,8 +20,15 @@ export const useViewState = () => {
return viewState;
};

-export const withViewState =

(
- Component: React.ComponentType


+export
+
+interface withViewStateProps {
+isVisible?: boolean;
+animationDuration?: number;
+experimentalItems?: React.ReactNode[];
+version?: any;
+} const withViewState =

(
+ Component: React.ComponentType

: withViewStateProps
): React.FC> =>
function withViewState(props) {
```

#### Expected Behavior

Not sure what happened here, it looks like the interface was not inserted at the top level of the file. I would expect a file that isn't rejected by tsc.

#### Reproduction

Same as #2014.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.