-
-
Notifications
You must be signed in to change notification settings - Fork 21
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: Skip type injection if template uses TypeScript #440
Conversation
🦋 Changeset detectedLatest commit: 136e6e0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Pull Request Test Coverage Report for Build 6965825787
💛 - Coveralls |
ff44961
to
a15002b
Compare
@@ -922,6 +923,9 @@ function buildProcessExpressionForExpression( | |||
typing: string | null, | |||
): (expression: ESTree.Expression) => ScriptLetCallback<ESTree.Expression>[] { |
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.
Should I use TSESTree
here? Write ESTree.Expression | TSESTree.Expression
everytime is hassle, and since the type information is only needed in a few places, I thought it would be okay to leave the type information as it is. What do you think?
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.
I think it's OK to leave it as is for now 👍. I think that acorn-typescript nodes and TSESTree are not compatible, so just using TSESTree will not be a complete solution.
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.
LGTM!
TODO
Discussion point:
I think somehow we can avoid to generate injection types if there is type information but I couldn't find a way. If we can do this, this is better in terms of performance.