What is the motivation behind having verbatimModuleSyntax = true as default? #9713
chesterlaykin
started this conversation in
General Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm curious to know the motivation to have
verbatimModuleSyntax
turned on as the default setting in Vue?Why is it that "
Vue does need this option to be set for best results
" ? It is hard to argue against, but I can't believe it. Should a frontend library make this choice in advance , rather than leave it to the ones making the application?I control what I am importing - if I import a type exported with
"export type"
, this type is stripped away without problem. So does Vue interefere in this functionality to cause a problem where there normally wasn't any??My speculation was this: you're trying to promote this way of importing types as a new standard. To me it seems like a matter of preference. In that case you are making an opinionated choice of disabling the default behaviour of typescript. It would be more reasonable to leave that to Typescript, if they want to make
verbatimModuleSyntax
the default behaviour, they could do it and create a new option to enable the previous behaviour. IfverbatimModuleSyntax
becomes the standard way, it means disabling the default behaviour - it seems backwards. So is this part of the motivation?Beta Was this translation helpful? Give feedback.
All reactions