react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Wrong import in rjsf/antd

Open v1ack opened this issue 2 years ago • 2 comments

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 avatar Sep 19 '22 07:09 v1ack

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

heath-freenome avatar Sep 19 '22 16:09 heath-freenome

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

v1ack avatar Sep 19 '22 20:09 v1ack