Property ‘startsWith‘ does not exist on type ‘string‘.
ts运行出现下面报错:
Property 'startsWith' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later
解决方法:
找到项目里tsconfig.json文件,
在compilerOptions下的lib里加入“ES2015”,就可以解决。