装饰器, ESLint与代码检查
My Dear Decorator ~ Love story between ESLint & TypeScript Decorator!
ref<T>() / ref(T) / ref() as Ref<T>? Vue3中的Ref类型体操
Ref的四种写法这是一个ref:const refA = ref();什么都没有, 所以是一个Ref<any>可以这样:refA.value = 123;
refA.value = "123";
refA.value = ["123", 123];这是另一个ref:const refB = ref(1);这时候, 他就是一个Ref<number>, 所以:refB.value = 2;
refB.value = -1;
refB.value = {}; // Error: Type '{}' is not assignabl...