1. 解决typescript Cannot redeclare block-scoped variable

解决: 在ts文件顶端加上

export {}

文件编译后

  "use strict"

  exports.__esModule = true 

  原理:会把整个文件当成一个模块来处理

 

 

 

相关文章:

  • 2021-08-13
  • 2021-12-02
  • 2021-11-24
  • 2022-02-01
  • 2021-12-16
  • 2022-12-23
  • 2021-11-17
  • 2022-02-24
猜你喜欢
  • 2022-12-23
  • 2021-10-13
  • 2021-04-05
  • 2021-11-26
  • 2021-05-24
  • 2021-06-16
  • 2022-03-03
相关资源
相似解决方案