-
Notifications
You must be signed in to change notification settings - Fork 3k
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
chore(distinctUntilKeyChanged): nail down key's typing with keyof T #3988
chore(distinctUntilKeyChanged): nail down key's typing with keyof T #3988
Conversation
8b997d5
to
0a0c9f4
Compare
The build is failing✨ Good work on this PR so far! ✨ Unfortunately, the Travis CI build is failing as of 0a0c9f4. Here's the output:
|
0a0c9f4
to
9b4d649
Compare
9b4d649
to
cd0dacd
Compare
cce8f56
to
678d0a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
LGTM, but could you add a couple of dtslint-based tests?
I'd like all typings changes to be accompanied by dtslint-based tests - so that we can build out the coverage.
In particular, I'd like to see a test that expects an error if the K
is not a key of T
- to guard against a regression.
For an example, have a look at https://github.com/ReactiveX/rxjs/blob/master/spec-dtslint/operators/concatAll-spec.ts
To run the dtslint tests, use this command:
npm run dtslint
678d0a5
to
05e71a3
Compare
05e71a3
to
bc9768d
Compare
Hi, thanks for the guidance of dtslint, I've add a couple of cases into its dtslint spec, hopefully it covers everything, feel free to pointing out if need further improvements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description:
With better typing constraint on
T[key]
looks up from TypeScript.