laf
laf copied to clipboard
在云函数上使用 string.matchAll ts会无法识别
需要使用正则,所以用到了 matchAll,但遇到下图的情况
显示如下报错信息:
Property 'matchAll' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.(2550)
在飘红处的前一行添加 //@ts-ignore
可以解决,并且能顺利运行
html
是 string 类型是吗?
@maslow 对的
问题不大,有空再处理就好,优先级不高