-
Notifications
You must be signed in to change notification settings - Fork 14
Typescript Conversion #82
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
base: development
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR converts the QueryQL library from JavaScript to TypeScript while upgrading the testing framework and linting configuration. The conversion adds comprehensive type safety to a query parsing and validation library that handles filtering, sorting, and pagination for REST APIs.
Key changes include:
- Complete TypeScript conversion with proper type definitions and interfaces
- Migration from Jest to Vitest for testing
- Upgrade from ESLint 8 to ESLint 9 with TypeScript support
Reviewed Changes
Copilot reviewed 83 out of 87 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
vitest.config.ts | New Vitest configuration with coverage and reporting setup |
src/**/*.ts | TypeScript conversion of all source files with type definitions |
src/**/*.test.ts | Test files converted to TypeScript with Vitest |
package.json | Dependencies updated for TypeScript, Vitest, and ESLint 9 |
eslint.config.mjs | New ESLint 9 configuration with TypeScript support |
tsconfig.json | TypeScript compiler configuration (implied) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Hey @KenCorbettTruepic – Wow, crazy! This does seem like something AI would be good at. It's cool to see the result. Honestly though, I'm not really wanting to convert this to TypeScript at this point. If I were, I'd want to do it manually as an exercise to better learn TypeScript myself. I'd be pretty lost merging this and then having to maintain the code going forward. Sorry, I imagine you were hoping for a different answer. 😞 |
This week for Cooldown I decided to try having Github Copilot in Agent mode help me rewrite this library into Typescript. I figured it was an excellent candidate as it had a bunch of unit tests and the code was well structured. It took a bit more than I originally had thought, but I was able to get it converted. As a high level summary, this is what we did:
I did some testing by locally symlinking this library into vision-api and it seems to work like a charm, and best of all it is now type aware!
I don't even know if you want to accept this pull request.
queryql
is your baby and brain child and I am not trying to take it over. It is just so core to all the list views in Vision, I have wished it was written in typescript for a couple years now. But, if you do not like this rewrite I am happy to just discard it. It was really good practice learning how to prompt agent mode to get it to do what I wanted it to do.