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

TypeScript type definitions #281

Open
aberenyi opened this issue Jan 11, 2016 · 11 comments
Open

TypeScript type definitions #281

aberenyi opened this issue Jan 11, 2016 · 11 comments

Comments

@aberenyi
Copy link

Hiya,

It would be extremely useful if one could import mongojs in a native typescript way, i.e. import * as mongojs from 'mongojs', however, a type definition file is not available on DefinitelyTyped (yet).

I am aware that there is a project called mongots, but that does not seem very active.

Thoughts?

Cheers

@saintedlama
Copy link
Collaborator

Definitely interesting - but we'll need the one that creates the typescript file 😄

@aberenyi
Copy link
Author

Haha, understood. Will try to carve out time to do it.

@Kaesebrot84
Copy link

Kaesebrot84 commented Feb 2, 2018

Hey guys,

I started by drafting a Database.d.ts. See this Gist.

The problem is that there are no JSDoc comments in the lib-folder files. Therefore it is sometimes hard to tell:

  • What the expected patterns for callback parameters are?

  • Which function parameters are required and which can be omitted?

  • What do some of the options parameters look like?

Also for example if I look up the database.close() documentation in the current README.md it states:

  • db.close()

But the code actually looks like:

  • function (force, cb)

So with a little more information I would be happy to finish the task. I also would suggest to include the types into the mongojs project itself instead of putting them into DefinitelyTyped, but this is just a suggestion.

Also a general question, is this repo still being maintained?

@saintedlama
Copy link
Collaborator

Repo is maintained, my reaction time sometimes a bit high 😢

Will merge a PR with the typescript definitions file. Your starting gist looks good - we can polish the API during the PR or after merging the PR if that's ok?

@rvdende
Copy link

rvdende commented Feb 24, 2020

@Kaesebrot84 I see the gist is gone.

Does anyone have a copy of the type definitions? I see its not on Definitely Typed yet either.

@Deph0
Copy link

Deph0 commented Apr 6, 2020

Any updates on this? Gist is MIA and i dont see any PR for this.

@Kaesebrot84
Copy link

Kaesebrot84 commented Apr 8, 2020

I am very sorry but I accidentally deleted the gist.
I contacted github support about this issue and will keep you updated on this topic.

@Kaesebrot84
Copy link

Seems like they are unable to recover it.

@TheCodedProf
Copy link

Hey, any updates on typescript definitions?

@rvdende
Copy link

rvdende commented Jan 26, 2021

Hey, any updates on typescript definitions?

I have switched to the mongodb package instead. It has types and full documentation.

@TheCodedProf
Copy link

ok

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

No branches or pull requests

6 participants