-
Notifications
You must be signed in to change notification settings - Fork 70
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
It would be really cool if we could write migrations in typescript #41
Comments
I like TS myself but there are dozens of compile-to-JS languages and it would be impractical to have special handling for each of them. Instead I'm interested in discussing the possibilities of writing your migrations in any language and making the module recognize them. a) programmatic usage of the module with a bit of extra config. If TS has a register mode similar to b) add a simple wrapper script that builds the migrations in place (.ts -> .js) and then use the binary as is c) support |
There's another option, which is the absolute minimum:
Now I use this:
Of course the types can be generated to |
Right now I have the following project structure:
And I have the following npm scripts:
Just an example for using typed migration scripts + my own build system. |
A nice advantage of this is, we would then be able to get the @typings for mongodb and get intellisense for the entire mongo api.
The text was updated successfully, but these errors were encountered: