在可用的选项列表中,记录了noResolve选项的以下内容:
--noResolve Do not add triple-slash references or module import targets to the list of compiled files.但是它似乎不起作用,因为它仍然在编译的/// <reference path... />文件中包含.js标记。
我是做错了什么,还是选择不是为了这个?
发布于 2016-01-18 12:06:24
文档中没有提到从.ts或.js文件中剥离三重斜杠注释。编译器仅不包括通过对已编译文件列表的三斜杠注释引用的文件。
您可以查看单元测试declarationEmit_invalidReference2.ts以验证tsc编译器行为:
https://stackoverflow.com/questions/34853877
复制相似问题