使用@types/pdfjs-dist 覆盖嵌入到 pdfjs-dist 中的类型

问题描述

我最近从 npm 安装了最新版本的 pdfjs_dist 并安装了适当的类型 @types/pdfjs-dist

但是类型没有正确导入。有一个目录 node_modules\pdfjs-dist\types,其中类型脚本尝试加载类型而不是 node_modules@types\pdfjs-dist

当我手动删除目录 node_modules\pdfjs-dist\types 一切正常,但我需要知道如何强制打字稿忽略 node_modules\pdfjs-dist\types 并从 node_modules@types\pdfjs-dist 加载类型

有没有办法从指定目录中强制加载类型?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)