logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

Vue3 + TS4.8的一些类型标注踩坑记录

Vue3 + TS4.8的一些类型标注踩坑记录:'PiniaPluginContext' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.ts(1444)

文章图片
#vue.js#前端#typescript
Vue3组合式Api script setup模式中顶层使用await报Top-level ‘await‘ expressions are only allowed when the ‘module‘

今天练习Vue3的Suspense组件的时候碰到在Vue3组合式Api script setup模式中顶层使用await时报错Eslint错误(能正常编译),错误提示是:Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'no

文章图片
#vue.js#javascript#前端
Vue3 + TS4.8踩坑之配置husky问题env: sh\r: No such file or directory

mac下,保存husky的钩子命令文件commit-msg之后,git commit的时候提示:env: sh\r: No such file or directory。原因是.editorconfig配置中的end_of_line = crlf强制将文件转为了dos编码格式的。需要注释掉end_of_line = crlf,将commit-msg修改为unix编码的。

文章图片
#vue.js#前端#typescript
到底了