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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to-typed #897

Open
moltar opened this issue Jun 30, 2022 · 4 comments
Open

Add to-typed #897

moltar opened this issue Jun 30, 2022 · 4 comments
Labels
new package Adds a new validation package.

Comments

@moltar
Copy link
Owner

moltar commented Jun 30, 2022

https://github.com/jsoldi/to-typed

@jsoldi? 馃榿

@moltar moltar added the new package Adds a new validation package. label Jun 30, 2022
@jsoldi
Copy link
Contributor

jsoldi commented Jul 6, 2022

Happy to help with this but I haven't figured out how to work with this library. I downloaded the package and tried to add a dummy case in the cases folder by cloning one of the existing ones. I also added it to cases/index.ts and did npm run test, npm run docs:build and npm run docs:start but keep seeing the old cases only. Did I miss any step?

@hoeck
Copy link
Collaborator

hoeck commented Jul 7, 2022

@jsoldi looks like you forgot to run the actual benchmarks with npm run start? That will run all cases, write the results to docs/results, which is then shown in the docs ui.

For development, you can also choose which cases are benchmarked by using npm run start run <your-package-name> <another-package-name>.

Also, for your cases to be picked up by the tests you'll need to manually import it here: https://github.com/moltar/typescript-runtime-type-benchmarks/blob/master/test/benchmarks.test.ts

@jsoldi
Copy link
Contributor

jsoldi commented Jul 9, 2022

So it seems that the problem was that I'm on Windows, which doesn't support the shebang code on top of ts-node's bin.js file. I guess this also explains why this file was randomly opening up on my text editor. The way I solved it was by changing this line to this:

const cmd = ['node', ...process.argv.slice(0, 2), 'run-internal', c];

But I'm not sure if that'll work the same on Linux although I think it should.

Anyway, I just sent pull request #902 with the new to-typed case. I didn't include the change above since that's a separate issue, but feel free to use that code if it work's on Linux too.

@moltar
Copy link
Owner Author

moltar commented Jul 9, 2022

@jsoldi ah, thanks for that. Good to know! Will move that into an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new package Adds a new validation package.
Projects
None yet
Development

No branches or pull requests

3 participants