Skip to content

Commit 3c28190

Browse files
author
mango
committed
feat: 优化FilterUnknownType工具类
1 parent 8a4dc47 commit 3c28190

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

types/wx/lib.wx.component.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ SOFTWARE.
2121
***************************************************************************** */
2222

2323
declare namespace WechatMiniprogram.Component {
24-
type FilterUnknownType<T> = string extends keyof T ? {} : T
24+
type FilterUnknownType<T> = {
25+
[P in keyof T]: string extends P ? never : T[P]
26+
}
2527
type Instance<
2628
TData extends DataOption,
2729
TProperty extends PropertyOption,

0 commit comments

Comments
 (0)