-
-
Notifications
You must be signed in to change notification settings - Fork 148
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
ValidPath without const assertion? #119
Comments
Hi there, Without a const assertion, the type of |
I somehow missed your answer, sorry! What I meant was that, I'd like the type safety to be enforced by the function signature, so the caller does not have to add |
It's a TypeScript limitation, I know how inconvenient this is. To work around that, the only solution is to take rest parameters instead. Or you could have this Maybe this can help you: |
Thanks a lot for your swift reply :) I'll look into those links right away! |
I posted a solution to this problem here in microsoft/TypeScript#30680. It will land soon in ts-toolbelt. |
This is amazing, thank you for doing this! I look forward to it landing is ts-toolbelt too. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
🤔 Question
I'm new to this library, and am still trying to get my head around it. It's very impressive! :)
In this sample https://pirix-gh.github.io/ts-toolbelt/modules/_object_pathvalid_.html there's the following code:
Why is const needed? And is there a way to make it work without the const assertion?
Hope you can help.
The text was updated successfully, but these errors were encountered: