Option importsNotUsedAsValues is deprecated and will stop functioning in TypeScript 55 Specify compilerOption ignoreDeprecations 50 to silence this error Use verbatimModuleSyntax insteadts解决报错
要解决这个报错,你需要在tsconfig.json文件中添加一个compilerOption,指定"ignoreDeprecations"为"5.0"。这将使TypeScript忽略对'importsNotUsedAsValues'的使用错误。
你的tsconfig.json文件应该如下所示:
{
"compilerOptions": {
"ignoreDeprecations": "5.0",
// 其他compilerOptions...
},
// 其他配置...
}
这样做后,TypeScript将不再报告关于'importsNotUsedAsValues'的错误,并且将使用新的选项'verbatimModuleSyntax'来处理导入模块。
原文地址: https://www.cveoy.top/t/topic/igvB 著作权归作者所有。请勿转载和采集!