尝试编译一个使用lit-element和lit-html并且也依赖于使用lit-html的其他项目的typescript项目时,我得到了这个错误
.../lit-html/lib/parts").NodePart' is not assignable to type 'import(".../lit-html/lib/parts").NodePart'.
Types have separate declarations of a private property '__pendingValue'.我正在使用webpack@4.42.1来尝试编译这个项目。
有什么想法吗?
发布于 2020-10-29 20:24:08
将这段代码添加到tsconfig中,强制它使用单个源文件来显示it -html:
"paths": {
...
"lit-html": ["node_modules/lit-html"],
"lit-html*": ["node_modules/lit-html/*"],
}https://stackoverflow.com/questions/64588656
复制相似问题