【问题标题】:Duplicate identifier/duplicate string index signature with code on a mounted drive已安装驱动器上带有代码的重复标识符/重复字符串索引签名
【发布时间】:2017-05-31 04:32:18
【问题描述】:

我的打字稿项目位于 c:\data。 c:\data 通过挂载的驱动器映射到 f: :

我使用 Visual Studio 2015,Typescript Tools 2.0.5 和 npm Typescript@2.1.5

Visual Studio 中的 Typescript 以某种方式获取指向相同 d.ts 键入文件的两个/两个路径,例如C:\data\xpsdev\trunk\web\workforce.mv​​c\node_modules\@types\jquery\index.d.ts 和 F:\xpsdev\trunk\web\workforce.mv​​c\node_modules\@types\jquery\index.d.ts

导致错误列表中出现重复的标识符/签名错误..

我怎样才能避免 Visual Studio 不考虑这两条路径???

在 tsconfig 中排除“f:\xpsdev”不起作用...

【问题讨论】:

    标签: typescript visual-studio-2015 typescript2.0 tsconfig


    【解决方案1】:

    解决方案正在添加

    { compileroptions : {"watch": true } }

    我收到一个新错误“当前主机不支持 --watch 选项”,因为 tsc.exe 不像 node.js 那样支持观看

    cfrhttps://github.com/Microsoft/TypeScript/issues/2375

    但我可以忽略这一点。

    【讨论】:

      猜你喜欢
      • 2022-01-16
      • 2021-09-26
      • 2013-04-13
      • 1970-01-01
      • 1970-01-01
      • 2019-06-03
      • 1970-01-01
      • 2016-12-02
      • 2012-04-08
      相关资源
      最近更新 更多