Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: mangled export by incompleteTypes fix in terrariajs #2016

Open
pjonsson opened this issue Nov 29, 2024 · 0 comments
Open

Bug: mangled export by incompleteTypes fix in terrariajs #2016

pjonsson opened this issue Nov 29, 2024 · 0 comments
Labels
status: accepting prs Please, send a pull request to resolve this! 🙏 type: bug Something isn't working :( 🐛

Comments

@pjonsson
Copy link
Contributor

🐛 Bug Report

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

Actual Behavior

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 = <P extends WithViewState>(
-  Component: React.ComponentType<P>
+export
+
+interface withViewStateProps {
+isVisible?: boolean;
+animationDuration?: number;
+experimentalItems?: React.ReactNode[];
+version?: any;
+} const withViewState = <P extends WithViewState>(
+  Component: React.ComponentType<P>: withViewStateProps
 ): React.FC<Omit<P, "viewState">> =>
   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.

@JoshuaKGoldberg JoshuaKGoldberg added type: bug Something isn't working :( 🐛 status: accepting prs Please, send a pull request to resolve this! 🙏 labels Nov 30, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title Bug: mangled export by incompleteTypes fix Bug: mangled export by incompleteTypes fix in terrariajs Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! 🙏 type: bug Something isn't working :( 🐛
Projects
None yet
Development

No branches or pull requests

2 participants