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

Mongoose type generator #609

Closed
SasanFarrokh opened this issue Oct 20, 2020 · 1 comment
Closed

Mongoose type generator #609

SasanFarrokh opened this issue Oct 20, 2020 · 1 comment

Comments

@SasanFarrokh
Copy link

#5 I'm submitting a suggestion to deal with mongoose typings

Current behavior

We're trying to make a schema out of decorated typescript class, nestjs developed a package for it, like typegoose did.
But the thing is mongoose is not typescript friendly and i think it's so much easier to create the schema in the mongoose way.

What i'm suggesting is to switch to mongoose schema first approach then generate the typings out of the schema.

What is the motivation / use case for changing the behavior?

Currently statics are not supported with this current approach.
And also generating is fun, like the graphql schema first approach is.

here is a minimal example i tried to write for the mongoose type generating:

https://github.com/SasanFarrokh/mongoose-type-gen

@kamilmysliwiec
Copy link
Member

Hey @SasanFarrokh! Unfortunately, generating TS typings based on mongoose schemas isn't something on our radar at the moment. We don't plan to add this feature in the near future.

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

2 participants