WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Bug: mangled export by incompleteTypes fix in terrariajs #2016

@pjonsson

Description

@pjonsson

🐛 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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