-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 #2698
TypeScript #2698
Conversation
- Remove Babel - Replace eslint with tslint - Check in yarn.lock - Temporarily remove coverage
…e tests running with ts
* master: Update mocha Enforce code coverage (#2702)
* Removing inherits, convert to classes * Move initialization to .init() * Loosen up code coverage on the TS branch * Really need to re-evaluate the batchInsert implementation
* master: Implement missing schema support for mssql dialect
…n wherever possible
Just incase anyone is wondering, I'm going to be offline for the next 2-3 weeks but will pick this up when I get back. |
@tgriesser if you need a hand with this let me know :) |
@JakeGinnivan thanks! Kind of gave up on this approach, going with more of a full scale internal rewrite so we can actually properly type all the internals from the start, and at the same time simplify/strip out a lot of unneeded layers (formatter, compiler, etc.). It's coming along, I'm going to work to get it working in one of the dialects (probably mysql) and then I'll open a PR... at which point I'll definitely be reaching out for feedback/help migrating the other dialects. |
@tgriesser another option is to upgrade to babel 7 (which can parse the TypeScript types and ignore them), then setup tsc with --allow-js. Then you can start incrementally adding types and getting the benefit now. |
@JakeGinnivan we just updated to babel 7 two days ago :) |
Closing in favor of https://github.com/tgriesser/knex-next (still super early on, nothing is actually setup from a connection standpoint, so don't look too much into it or expect it to work) |
@JakeGinnivan I'd personally rather have no types internally than partial/loose types. Without Also there's a ton of how the library is structured more generally I'd like to address with this effort and I believe TypeScript and some of the new ideas in the repo linked above will provide a path forward on that. |
@tgriesser knex-next looks interesting, big step up. Would like to help when possible. I guess this early on would just be getting in the way, but just FYI. |
I think I mentioned this before, but this is the beginning of an experimental migration toward TypeScript. This may not get merged, so just consider this an experiment/WIP for now.
For starters, we'll have the TypeScript compiler building instead of Babel and just compile the js files, so we can migrate files one-at-a-time, but eventually some of the goals for this is:
export default
anywhere, making it simpler to use an editor to do full project refactors based on the symbolProbably will be broken for a bit, will be welcoming contributions once some of the core config for this is ironed out and we have some examples of the conventions to follow.