Skip to content

[Babel-template] Support for (dot) property accessors after TS's non null assertion (!) #15220

Answered by JLHwung
Arooba-git asked this question in Q&A
Discussion options

You must be logged in to vote

Since the question is now updated by using @babel/template, you can specify the plugin option in the second argument of the template.ast call:

// template.ast`foo!.bar` will not work
template.ast(`foo!.bar`, { plugins: ["typescript"] })

Replies: 3 comments 22 replies

Comment options

@Arooba-git
Comment options

@liuxingbaoyu
Comment options

@Arooba-git
Comment options

@liuxingbaoyu
Comment options

@Arooba-git
Comment options

Comment options

You must be logged in to vote
6 replies
@liuxingbaoyu
Comment options

@Arooba-git
Comment options

@liuxingbaoyu
Comment options

@Arooba-git
Comment options

@liuxingbaoyu
Comment options

Answer selected by Arooba-git
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants