alibaba-fusion / next

🦍 A configurable component library for web built on React.
https://fusion.design
MIT License
4.59k stars 591 forks source link

[Field]优化 Field 类型注释 #4991

Open xxih opened 3 days ago

xxih commented 3 days ago

Component

Field

Feature Description

  const field = Field.useField<{
    schemaName: string;
    tableName: string;
    comment: string;
    owner: string;
  }>({
    autoUnmount: false,
    values: {},
  });

希望支持这样的泛型写法,能使得 field 使用过程中有更好的类型提示。

github-actions[bot] commented 3 days ago

这是您为 Fusion/Next 提的第一个 issue,感谢您对 Fusion 的信任和支持,我们会尽快进行处理。

xxih commented 3 days ago

我在个人项目中对 Field 做了一层封装,重写了类型注释。可提供更好的类型提示,供参考交流

demo.txt type.txt

image