I'm writing an AntD form. Is there a way to shorten the form component name with type, like this:
const CustomForm = Form<LongTypeName>
const CustomFormItem = CustomForm.Item
const Bar = () => (
<>
<CustomForm />
...
<CustomFormItem />
</>
)
I'm using AntD 4.24.7, TS 4.1.2.
With the hint of @slava-knyazev I find that the code only works in TS 4.7+. It is a feature called Instantiation expression.