Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: fix(typing/Predicate): 修复 Predicate 类型 #57

Open
wants to merge 1 commit into
base: chore/upgrade-ts
Choose a base branch
from

Conversation

chuan6
Copy link
Contributor

@chuan6 chuan6 commented May 14, 2018

原来的定义中,P in keyof T & PredicateMeta 的操作符优先级有误,想
表达的语义是 P in keyof (T & PredicateMeta)(这种写法 ts 不支持),
而实际的语义是好像并非如此,不在 T 或 PredicateMeta 中的属性名不会导致
报错,降低了类型检查的有效性。

原来的定义中,P in keyof T & PredicateMeta<T> 的操作符优先级有误,想
表达的语义是 P in keyof (T & PredicateMeta<T>)(这种写法 ts 不支持),
而实际的语义是好像并非如此,不在 T 或 PredicateMeta 中的属性名不会导致
报错,降低了类型检查的有效性。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant