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

[BUG] TS2589: Type instantiation is excessively deep and possibly infinite. #2681

Open
1 task done
qq1014853731 opened this issue Jan 20, 2025 · 1 comment
Open
1 task done

Comments

@qq1014853731
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

Form

Semi Version

2.73.0

Current Behavior

Image Image

tsx Form组件报错,不影响运行。希望可以处理下,api用法错了会看不出来,问题还是蛮严重的

Expected Behavior

Form组件Api可以正常解析

Steps To Reproduce

No response

ReproducibleCode

<Form labelPosition="inset" layout="vertical" onSubmit={doLogin}>
                    {({ formState, values, formApi }) => (
                        <>
                            <Form.Input
                                field="username"
                                label="用户名"
                                placeholder=""
                                trigger="blur"
                                rules={[{ required: true, message: '' }]}
                                style={{ width: '100%' }}
                                size="large"
                            />
                            <Form.Input
                                field="password"
                                label="密码"
                                placeholder=""
                                trigger="blur"
                                rules={[{ required: true, message: '' }]}
                                mode="password"
                                style={{ width: '100%' }}
                                size="large"
                            />
                            <Button
                                theme="solid"
                                type="primary"
                                block
                                htmlType="submit"
                                className="btn-margin-right tw-w-full"
                                size="large"
                            >
                                立 即 登 录
                            </Button>
                        </>
                    )}
                </Form>

Environment

- OS: Macos 15.1.1 (24B91)
- browser: Chromium: 126.0.6478.234
- npm: 10.5.2
- node: v20.13.1

Anything else?

No response

@DaiQiangReal
Copy link
Collaborator

这是 typescript 5 的 bug,影响了很多开源库包括 lodash, 详情microsoft/TypeScript#53514 可以先添加 @ts-ignore 等待微软修复,或者先降级到 4 例如 yarn add [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants