Skip to content

Types generated by ExtractPropTypes treat optional properties as required #5272

Closed
@zouyaoji

Description

@zouyaoji

Version

3.2.27

Reproduction link

codesandbox.io

Steps to reproduce

打开链接,鼠标放到第18行中的“b”变量上面。
Open the link, mouse over the "b" variable in line 18.

image

What is expected?

不要将required属性为false的属性标记为必选属性
Don't mark a property with the required property false as required

What is actually happening?

将可选prop标记成了必选
Treat optional properties as required


Similar to #3122

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions