【TypeScript】Vue: Property finally does not exist on type Promise<void>.
问题描述
Vue: Property finally does not exist on type Promise<void>. Do you need to change your target library? Try changing the lib compiler option to es2018 or later.

原因分析
Promise.prototype.finally是在ES2018中引入的。如果使用finally方法,需要确保TypeScript配置文件(tsconfig.json)中的lib选项包含es2018或更高版本。
解决方案
- 在项目根目录创建 tsconfig.json
- 写入
{
  "compilerOptions": {
    "lib": ["es2018", "dom"]
  }
}



![[免费]SpringBoot+Vue疫苗接种预约管理系统【论文+源码+SQL脚本】](https://i-blog.csdnimg.cn/direct/6e930f3dde3c4f2bb9cf4501c8642e1c.jpeg)















