import type 与 import 的区别
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there’s no remnant of it at runtime.
import type 是用来协助进行类型检查和声明的,在运行时是完全不存在的。
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there’s no remnant of it at runtime.
import type 是用来协助进行类型检查和声明的,在运行时是完全不存在的。