ant-design / ant-design/pro-components

Getting an error Type error: Type parameter declaration expected. 🐛[BUG]

Open
#8,217 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

Failed to compile.
./node_modules/@ant-design/pro-form/es/components/FormItemRender/index.d.ts:24:41
Type error: Type parameter declaration expected.
22 | }[]> = T[number]['name'];
23 | export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): ControlModelType;
> 24 | export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): {
| ^
25 | [P in T[number]]: ControlModelType;
26 | };
27 | export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): {
-----> Build failed

image

Note this is using heroku

any ideas?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Heroku build and inspect node_modules/@ant-design/pro-form/es/components/FormItemRender/index.d.ts around lines 24-27, where the TypeScript parser reports the error. Compare the declaration syntax with the TypeScript version used by the build. Done means the project compiles successfully without this type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.