Formily.Schema.Types.ISchema 类型中的索引签名是否可以去掉? #1657
liuweiGL
started this conversation in
Show and tell
Replies: 3 comments 4 replies
-
不能去掉,因为要支持挂自定义属性 |
Beta Was this translation helpful? Give feedback.
4 replies
-
干掉了 76a302c |
Beta Was this translation helpful? Give feedback.
0 replies
-
等 [email protected] 可以使用 template literal 做 index signature 时加回去: [key: `x-${string}`]: any |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
问题
在 Formily.Schema.Types.ISchema 中存在索引签名:
使用
Omit
或则Pick
扩展类型的时候丢失 ISchema 字段信息,导致 vscode 的 autocomplete 功能无法使用:原因
[key: string]: any
返回的keyof
为string
,把原有的字段覆盖了。microsoft/TypeScript#31153
Beta Was this translation helpful? Give feedback.
All reactions