Having some trouble adequately explaining and defining the issue at hand, I can only pinpoint it occurring in Chrome DevTools, with the code compiled using Parcel and TypeScript version 4.4 or higher.
Specifically, I'm observing an issue a few lines past line 500 where const parsed
appears undefined both on hover and within the scope window. Logically, if it were truly undefined, accessing parsed.type
and subsequently .value
at line 506 should result in errors.
https://i.sstatic.net/AY2CQ.png
However, on progressing to line 507, surprisingly enough, parsed
now contains data as reflected in the scope window which previously showed
{type: 'ok', value: 'custom-plot'}
.
https://i.sstatic.net/CV8Ia.png
Although my exposure to Parcel is limited, I believe a refined webpack configuration would enhance debugging experiences with TypeScript. How can I effectively commence debugging this scenario?
At the very least, I aim to instruct the debugger to move beyond line 500 to unveil the contents of the variable post that assignment.
EDIT
Following an upgrade to Parcel, the situation has improved considerably; however, I remain intrigued by the root cause within the tool chain triggering this behavior.