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

Fix generic #41

Merged
merged 5 commits into from Dec 1, 2020
Merged

Fix generic #41

merged 5 commits into from Dec 1, 2020

Conversation

karlhorky
Copy link
Contributor

@karlhorky karlhorky commented Nov 25, 2020

Fixes implementation of #31

@bendrucker
Copy link
Owner

Can you add a failing test case that passes with your changes? I don't write TypeScript and rely on test coverage for details like this.

@karlhorky
Copy link
Contributor Author

Sure! Can you enable the tests for branches as well? So I can see whether they pass here?

@karlhorky
Copy link
Contributor Author

karlhorky commented Nov 25, 2020

Oh and re: writing new tests, it seems like the tests are actually wrong, so I will just fix them :)

@karlhorky
Copy link
Contributor Author

One thing that I would like to do (just as a fun project) is to add proper recursive types using the new Template Literal Types in TypeScript 4.1.2.

There is a ToSnakeCase type by @mmkal here:

microsoft/TypeScript#40336 (comment)

So then TypeScript would know exactly what properties are on the final object.

@karlhorky
Copy link
Contributor Author

@bendrucker tests and types are fixed (in 1bab44b)

@bendrucker
Copy link
Owner

Great work, thank you!

@bendrucker bendrucker merged commit f2b50d1 into bendrucker:master Dec 1, 2020
@karlhorky karlhorky deleted the patch-1 branch December 1, 2020 08:29
@karlhorky
Copy link
Contributor Author

Glad to help, thanks for the merge!

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

Successfully merging this pull request may close these issues.

None yet

2 participants