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
It's just an ask for public functions in our factory.ts file for creating/updating these node kinds. It's not a big deal and easy for us to do; we probably never added them since we didn't need them as our own jsx transform translates them to different kinds of AST nodes.
To correctly create synthesized JsxText Nodes, there needs to be a text property on JsxText. Currently there's no property with information about the content of this node.
Adding such a property also requires changes in the parser.
None of our nodes really contain their text - identifiers get a name set because it's checked so often, same with literals. JSX text just isn't as meaningful and so anytime it's needed it's just sliced out of the containing source file.
Activity
RyanCavanaugh commentedon Jan 15, 2019
Wesley Wigham (@weswigham) thoughts? I haven't looked at this since we added fragment support so I'm not clear on the request
weswigham commentedon Jan 15, 2019
It's just an ask for public functions in our
factory.tsfile for creating/updating these node kinds. It's not a big deal and easy for us to do; we probably never added them since we didn't need them as our own jsx transform translates them to different kinds of AST nodes.ajafff commentedon Jan 15, 2019
To correctly create synthesized JsxText Nodes, there needs to be a
textproperty onJsxText. Currently there's no property with information about the content of this node.Adding such a property also requires changes in the parser.
Kingwl commentedon Jan 16, 2019
I'm not sure that why JSXText does not hold the text, does that any reason?
weswigham commentedon Jan 16, 2019
None of our nodes really contain their text - identifiers get a name set because it's checked so often, same with literals. JSX text just isn't as meaningful and so anytime it's needed it's just sliced out of the containing source file.
weswigham commentedon Jan 16, 2019
(It's probably correct to move JSX text into the category of literals and give it an updatable
valuemember.)