-
Notifications
You must be signed in to change notification settings - Fork 57
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: unhandled exception for index not found in reflected types #45
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #45 +/- ##
=======================================
Coverage 99.47% 99.48%
=======================================
Files 4 4
Lines 191 193 +2
Branches 58 59 +1
=======================================
+ Hits 190 192 +2
Misses 1 1
Continue to review full report at Codecov.
|
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.
Thanks! Can you add a test case to demonstrate the error?
Also please run yarn format
so that we get rid of the whitespace changes in the diff.
Hi, I updated the yarn format. |
Ok, I'll look into adding a test and getting this merged his week. |
any updates? |
Hi, Any chance we can move on with the PR? |
Okay, please revert the lock file deletion and we'll get this merged! |
The reason I'm a bit hesitant merging this is it's unclear to me whether this is something we should handle in the library or is this an edge case specific to your particular setup and thus better handled in your codebase. Hard to say without knowing the context or having a test! Then again it should be a pretty non-intrusive change so might as well go for it, I think. |
ok. I have reverted it |
Your previous commit added a bunch of |
Fix for:
On
const { explicitType, index, object, method } = param;
const type = Reflect.getMetadata('design:paramtypes', object, method)[index];
An error can be thrown if the index is not in the array;