<script setup> can not work with import types from other .ts file
Version
3.1.0-beta.3
Reproduction link
Steps to reproduce
- in
<script setup>
use import to import some types like:import { StateType } from './types.ts
; - got an error from typescipt:
'StateType' only refers to a type, but is being used as a value here.ts(2693)
What is expected?
import a type, used as a type
What is actually happening?
tsc thinks <script setup>
use it as a value
version:
- "typescript": "~4.1.5"
- "vue": "^3.0.0"