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
cartant
left a comment
There was a problem hiding this comment.
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. |
Description:
With better typing constraint on
T[key]looks up from TypeScript.