You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context/Screenshots
Actually it is a problem because @babel/template is using types.cloneNode, the result is that it is not possible to have a type annotation using Babel template.
The original use-case is to be able to create TypeScript template for SVGR (see gregberge/svgr#226).
The text was updated successfully, but these errors were encountered:
Hey @neoziro! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
gregberge
added a commit
to gregberge/babel
that referenced
this issue
Nov 8, 2018
Bug Report
Current Behavior
Calling
types.cloneNode
on a node containing atypeAnnotation
does not preserve it.Expected behavior/code
It should preserve
typeAnnotation
.Environment
Possible Solution
Clone typeAnnotation here: https://github.com/babel/babel/blob/master/packages/babel-types/src/clone/cloneNode.js#L64
Additional context/Screenshots
Actually it is a problem because
@babel/template
is usingtypes.cloneNode
, the result is that it is not possible to have a type annotation using Babel template.The original use-case is to be able to create TypeScript template for SVGR (see gregberge/svgr#226).
The text was updated successfully, but these errors were encountered: