type definitions can disappear if they are mentioned in a template #5414
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has workaround
A workaround has been found to avoid the problem
🐞 bug
Something isn't working
scope: sfc
Version
3.2.30
Reproduction link
stackblitz.com
Steps to reproduce
define a custom type in another file:
TestCase.ts:
Reference it in your component template as an Array or as TestCase[]:
App.vue:
What is expected?
It is expected that the type be in the generated js file for TestCase
What is actually happening?
the type is omitted ONLY IF you cast something as an array of TestCase in the template
This is a very bizarre bug where adding a bit of code in the template changes the javascript generated. It doesn't work with yarn dev, but works fine with yarn build.
The text was updated successfully, but these errors were encountered: