react icon indicating copy to clipboard operation
react copied to clipboard

fix: reslove the error that 'interface' cannot be used as an identifi…

Open happyhyep opened this issue 1 year ago • 1 comments

Summary

export type Container =
  | interface extends Element {_reactRootContainer?: FiberRoot}
  | interface extends Document {_reactRootContainer?: FiberRoot}
  | interface extends DocumentFragment {_reactRootContainer?: FiberRoot};

The error 'interface' cannot be used as an identifier in strict mod appears in the code above.

image

So I corrected it with the code below, and the error does not occur anymore.

export type Container =
  | (Element & {_reactRootContainer?: FiberRoot})
  | (Document & {_reactRootContainer?: FiberRoot})
  | (DocumentFragment & {_reactRootContainer?: FiberRoot});

How did you test this change?

Since the UI is not a changed operation, I ran the yarn test and I was able to confirm that it runs without any problems. And the error message is no longer displayed in intelij IDE.

image

happyhyep avatar Sep 24 '24 05:09 happyhyep

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 3:33pm

vercel[bot] avatar Sep 24 '24 05:09 vercel[bot]

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

github-actions[bot] avatar Mar 09 '25 16:03 github-actions[bot]

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

github-actions[bot] avatar Mar 16 '25 16:03 github-actions[bot]