[Babel-template] Support for (dot) property accessors after TS's non null assertion (!) #15220
-
Hi 👋 Does |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 22 replies
-
I can't reproduce your issue on Babel REPL: https://babel.dev/repl#?browsers=&build=&builtIns=false&corejs=3.21&spec=false&loose=true&code_lz=IYQgdARkA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Ctypescript&prettier=false&targets=&version=7.20.4&externalPlugins=&assumptions=%7B%7D Since you are using the Babel parser, did you enable the |
Beta Was this translation helpful? Give feedback.
-
Since the question is now updated by using // template.ast`foo!.bar` will not work
template.ast(`foo!.bar`, { plugins: ["typescript"] }) |
Beta Was this translation helpful? Give feedback.
-
And for anyone reading this thread in future, I had actually gotten confused by the usage of the term 'placeholders' in |
Beta Was this translation helpful? Give feedback.
Since the question is now updated by using
@babel/template
, you can specify the plugin option in the second argument of thetemplate.ast
call: