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

Wrong import in rjsf/antd #3123

Closed
3 of 4 tasks
v1ack opened this issue Sep 19, 2022 · 2 comments · Fixed by #3147
Closed
3 of 4 tasks

Wrong import in rjsf/antd #3123

v1ack opened this issue Sep 19, 2022 · 2 comments · Fixed by #3147
Assignees
Labels
bug p1 Important to fix soon

Comments

@v1ack
Copy link
Contributor

v1ack commented Sep 19, 2022

Prerequisites

What theme are you using?

antd

Version

5.0.0-beta.8

Current Behavior

Wrong react import in generated file
node_modules/@rjsf/antd/dist/index.d.ts:35

export const Form: import("@rjsf/core/node_modules/@types/react").ForwardRefExoticComponent<import("@rjsf/core").FormProps<any, {}> & import("@rjsf/core/node_modules/@types/react").RefAttributes<import("@rjsf/core").default<any, {}>>>;

Expected Behavior

Must be import("@types/react")

Steps To Reproduce

No response

Environment

- OS: macOS 12.5
- Node: v18.7.0
- npm: 8.15.0

Anything else?

No response

@v1ack v1ack added bug needs triage Initial label given, to be assigned correct labels and assigned labels Sep 19, 2022
@heath-freenome
Copy link
Member

Since antd isn't written in typescript the compiler is automatically generating things like this. What kind of problems is it causing?

@heath-freenome heath-freenome removed the needs triage Initial label given, to be assigned correct labels and assigned label Sep 19, 2022
@v1ack
Copy link
Contributor Author

v1ack commented Sep 19, 2022

This import can't be found, so unable to compile typescript.
As a workaround I use direct import from antd.esm

@heath-freenome heath-freenome added the p1 Important to fix soon label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p1 Important to fix soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants