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
-
|
等 typescript@4.4 可以使用 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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
问题
在 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