-
-
Notifications
You must be signed in to change notification settings - Fork 60
feat: implement letter.lowercase
and letter.uppercase
#77
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
Conversation
There might be a better way to handle them through savvy typing of the `extractRegExp` function.
|
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.
The test issues you encountered are flagging that the type generation is broken at the moment.
(To be clear, this is the most difficult part of the PR for the reason you've encountered.)
We might consider rethinking the API. Maybe letter.any
, letter.lowercase
, letter.uppercase
as three in parallel? wdyt @didavid61202
HI @danielroe, @ccjmne . I've made a PR #79 related to the type inferencing issue encountered in the PR. |
Someone is attempting to deploy a commit to a Personal Account owned by @danielroe on Vercel. @danielroe first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Thank you both! ❤️
letter.lowercase
and letter.uppercase
letter.lowercase
and letter.uppercase
This was really nice! I learned some things, thought about some implementation details, read code that's not mine, discovered the Vite bundler, realised that pnpm is really getting popular... Great experience 👍 Cheers! |
@ccjmne Thanks! Thanks for your contribution! 💚 Cheers! 🍻 |
Pretty trivial implementation!
However, something is wonky in the changes to the typings tests I introduced in c2200a4...
The tests were broken by introducing
lowercase
anduppercase
properties toletter
, and when I tried reproducing a minimal example of it on typescriptlang.org, of course there, anAsdf<T> & { yes: 'no' }
does extendAsdf<any>
. I couldn't put my finger on what the fix should be.There might be a better way to handle them through savvy typing of the
extractRegExp
function, but I couldn't figure it out myself. 🙇♀️Resolves #37.