In TypeSctipt 2.0, do you still need to include /// reference path="" as in
///<reference path="../../../../typings/app.d.ts"/>
or is that a thing of the past as now TS searches all directories specified in tsconfig? would great if someone can elaborate with detailed answer...
tx
Sean
答案 0 :(得分:2)
您可以让tsconfig.json
指定项目中的主要文件(因此称为包含文件。但是如果包含文件中有任何reference
个标记指向不包含的文件,它们也将包含在编译上下文中。
我一般不会使用reference
条评论。
此处还介绍了How does Typescript load typings? (and what each TS-related file's purpose is)