-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(types): allow key separator augmentation #1367
Conversation
Seems great to me, I'll just do some performance tests tomorrow to ensure compilation time won't be jeopardized. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.
Worry not @pedrodurek , thank you for taking the time after all :) Im a little bit disappointed to see that compilation time increases, I think it shouldn't... Do you have any idea on how can we improve performance or can we move foward? BTW, how can I test myself performance? are you using a project that you can share? |
Hey @ImADrafter don't worry, it didn't increase much. That's normal, the more validation we add, the more time it'll take since it iterates over every key doing the same check. I'm testing using this repo https://github.com/pedrodurek/i18n-type-tests, to test performance you need to enable the Ts Server log, you can find more info here. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
so ready to merge? |
yep! |
included in v11.13.0 |
ATM, type checking the dictionaries will not work properly if you have changed the keySeparator for javascript:
The changes that im proposing allows to augment the keySeparator, in order to maintain aligned the typescript interface and the i18n instance.
Nevertheless, im not happy with all the code changes cause i had to rewrite
NormalizeReturn
, and it became too complex to really understand all the chaining conditions, so if you have any clue of how it should remain simple, please let me know.Thank you in advance for reviewing this changes.
Checklist
npm run test
Checklist (for documentation change)