-
Notifications
You must be signed in to change notification settings - Fork 350
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
Error: did not recognize object of type "TSInstantiationExpression" #1230
Comments
bump |
Refs #1230 See https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#instantiation-expressions. This won't work yet because `ast-types` does not yet know about `TSInstantiationExpression`. Once it does `recast` will need to be updated to include the newer release of `ast-types`, at which point it will be supported.
Is there any workaround or a temporary fix for that? I'd be happy to ignore these, just not to die. My jscodeshift-based auto-refactoring script fails to work on real-life files because of that. Even though it doesn't need to refactor any TSInstantiationExpressions. |
Does it fail on every file? Or only files with |
I have a large codebase, 100+ files have |
Refs #1230 See https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#instantiation-expressions. This won't work yet because `ast-types` does not yet know about `TSInstantiationExpression`. Once it does `recast` will need to be updated to include the newer release of `ast-types`, at which point it will be supported.
Without any type of pressure, may I kindly wonder, is this going to be fixed soon? I saw a commit has landed, but not sure how much work is ahead. Thank you for what you do! |
The remaining work in #1232 is worthwhile for completeness but not necessarily relevant unless you're using @iliakan If you want to test the current changes locally, you should be able to run this command to install npm i recast@pr-1232 If this is useful, let me know. I might try to automate it for any PR, so it's easier for folks to test/use any proposed changes. |
Last time it worked without errors (but I did not check the outcome). I'll retest again after I rewrite some stuff ;) |
Alright folks, please try running Since I have not tagged this version as |
Refs benjamn#1230 See https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#instantiation-expressions. This won't work yet because `ast-types` does not yet know about `TSInstantiationExpression`. Once it does `recast` will need to be updated to include the newer release of `ast-types`, at which point it will be supported.
Hi 👋
I'm using recast with babel parser, and getting this error when trying to parse any file containing TSInstantiationExpression. Is recast missing TSInstantiationExpression support or am I missing something? 🤔
The text was updated successfully, but these errors were encountered: