-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
TypeError: Cannot read properties of undefined (reading 'StringLiteral') #158248
Comments
@jrieken Are the integration tests built with the new builder? |
Yes, there is no more inlining happening for tests. @aeschli this could be hint that you have a cycling dependency that shows when not inlining enums |
How do I get more info here? |
Hard to say. You can run the transpile-task locally ( |
I removed the cyclic dependency
The transpiler just converts the import to require, without trying to locate the d.ts file or looking at any declarations. I tested the same when the const enum is in a So this looks like a fundamental problem with const enums in d.ts files. Looks like I have to change the jsonc_parser code to compile with |
Yeah, that might be an unfortunate fact. The transpiler doesn't actually resolve enums and therefore it cannot read/inline its values. It always references them by name and expects something "to be there at runtime". Using the |
I guess it's fair to argue that using const enums in in exported node modules APIs Still we will hit this with node modules we can't easly change. I guess in that case we need to redeclare the enum in our land. Can we add a lint rule that warns about the usage of const enums from |
Fixed by microsoft/node-jsonc-parser#70 |
This just appears in the integration test logs (
exthost.log
), thought I would report it anyway:The text was updated successfully, but these errors were encountered: