vuejs / vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Home Page:http://v2.vuejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

import type { CSSProperties } from 'vue' is error

Miofly opened this issue · comments

commented

What problem does this feature solve?

vue3
import type { CSSProperties } from 'vue' is correct

vue2.7
import type { CSSProperties } from 'vue' is error

What does the proposed API look like?

import type { CSSProperties } from 'vue' in 2.7 is correct

The problem is in the code for Vue 2.7, which does not yet support the syntax for using import type. import type is the syntax in TypeScript for importing types without importing specific values. The Vue 2.x version usually uses JavaScript, not TypeScript.