-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(NODE-4129): constrain watch
type parameter to extend ChangeStream
type parameter
#3183
Conversation
Hi @eps1lon thanks for your help! Does only this change clear up the errors you are seeing? When I try compiling the driver with Oh, or perhaps this is the only API usage you have so there are no other errors on your end. Can you confirm? |
I was only seeing 3 errors:
From what I can tell it's the same line that produces all 3 of those. But there may be more errors related to this issue. |
Ah yea, our This change looks good to me but were you able to see a passing run with this change? Just confirming because I want to make sure this PR will unblock you and we can follow up with the errors I'm seeing. |
Hard to judge since it's unclear what command produces the types. Just guessin from the naming that this fixes it. |
I ran the tests locally, it looks like we need updates to the watch functions on Collection and MongoClient as well. I've updated those. Just in case you missed it I'm still seeing an error from another package: ../styled-components/index.d.ts(119,68): error TS2344: Type 'P' does not satisfy the constraint '{ theme?: T | undefined; }'. |
I can deal with that later. Thanks for pushing this further. The additional changes look good to me! |
watch
type parameter to extend ChangeStream
type parameterwatch
type parameter to extend ChangeStream
type parameter
@nbbeeken Thanks for the quick assistance! Do know roughly when this'll be released? |
@eps1lon Sorry about the delay, the fix is available now in v4.5.0! |
Description
What is changing?
Constrain
watch
type parameter to same constraint asChangeStream
Is there new documentation needed for these changes?
Not
What is the motivation for this change?
Starting with microsoft/TypeScript#48366 we'll no longer be able to assign an unconstraint type parameter to a constraint one.
Constraining the type is required to pass DefinitelyTyped/DefinitelyTyped#59560
Double check the following
npm run check:lint
script<type>(NODE-xxxx)<!>: <description>