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
[mongodb] Added support for default generic types #16198
Conversation
types/mongodb/index.d.ts to author (@CaselIT). Could you review this PR? Checklist
|
Waiting for DT to start supporting ts2.3 in about a month. See microsoft/dtslint#31 for details |
//http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html | ||
export class Cursor<T> extends Readable { | ||
export class Cursor<T = Default> extends Readable { |
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.
Don't forget to do the same for AggregationCursor<T>
and remove overriding methods of Collection
(like find()
) that return Cursor<any>
and AggregationCursor<any>
. They are unnecessary now.
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.
You are right, I forgot to update the AggregationCursor
. I'll try to do it today. Thanks for the reminder!
@andy-ms I'm not sure about the travis fail. It complains about the |
Yes, if this is breaking other packages they will need a |
Thanks. I will add the version header. 👍 |
@andy There seem to be a bug in the types-publisher test. They do have a reference in the test file. So that may be the cause.Test of easy-jsend Test of express-brute-mongo |
@andy Let me know if you prefer an issue in the types-publisher repo and adding the |
I don't consider that a bug -- we will test every package using its declared version, and easy-jsend won't compile in ts2.0 any more. EDIT: Actually, these libraries both seem to really depend on mongodb, but are hastily written and use |
Thanks @andy-ms for the feedback |
…end test dependency on mongoose
Should be ok now. |
Thanks! |
Please fill in this template.
npm run lint package-name
(ortsc
if notslint.json
is present).Select one of these and delete the others:
If changing an existing definition:
tslint.json
containing{ "extends": "dslint/dt.json" }
.Added support for default types introduced in ts2.3.
Once microsoft/dtslint#31 is fixed I'll add tslint support when I have time