三斜杠指令
三斜杠指令是包含单个 XML 标记的单行注释。注释的内容用作编译器指令。
三斜杠指令仅在其包含文件的顶部有效。三斜杠指令前只能有单行或多行注释,包括其他三斜杠指令。如果在语句或声明之后遇到它们,它们将被视为常规单行注释,并且没有特殊含义。
/// <reference path="..." />
/// <reference path="..." />
指令是该组中最常见的。它用作文件之间依赖关系的声明。
三斜杠引用指示编译器在编译过程中包含其他文件。
当使用 out
或 outFile
时,它们还用作对输出进行排序的方法。预处理通过后,文件以与输入相同的顺序发送到输出文件位置。
预处理输入文件
bvYb93SHdvAzFT/23oF1p/sOLqK6MpnjfpWLAMmvPdZX6UYbyHNbAYw80sV+L2DsbP47vXHY3THezk6WbGtHTL82xXg2B0sLBmW3eqYlI8Wv3CDD7MyCG9rPWpwFM2jcHBA+VnXNtNrHQCWMVZJAsjkEBzoCb20JsGzOqCRnL+ta5qqoDl5CKbzzquJ1EgHK
LHxmRCGsoU/lhpbVVdrwdnoep+aMyySNAVPkD66QMm7A2Y+N6UZ7/jWiR/l/Zc9aTf77Vawun0HL4C0LFRT46heabWeLB7zgRRUpxGwBWta0D4E3GK60ZMJDJ2EwwZlYAXe/5/w7rkC6U50SLFw4BS2hIYAxLl67LFQdSSOBLhuM8iGXmUOHFA31HL6cPxCpAMR2gbXTbod4JqOuJnUNcg4nc+diejSnZAReDrKC2i7E1TWhJyd1sTRuH1X3KbqFmopOTzXzmGfL1U8FsBzMBWU3t/jozWS0gXV5agFhDncACBPh/13s72ZgAoTEwnjKaSjb7PeUM/OhsFhvAIqA/EKeqxIwpgDLozmQ5Jixp7UN4oszyp4pzCRNanq+1Y7Vo+RWjRdGrgzI4C3HXn6+Y3QRcWqT5mBvEYVDsc9WkEQKobHbgy/voJgN7B/SflAEvU6Uohv/D78JH592hOEnmBltzpIDbbbxYT2+135eK8BXrI4y0Vqbs4IGSQ6J05PonRV0E3suSEhhbY/9Qh3m6yEkp3/ySZQ/FJebY9q29fILYn2zomHfhJqg/AdqpDNryuR/0hrJw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+zxS7nz5MQRjDQzpu6ids=
/// <amd-module />
hutJgMfalMULXfxCI/yn8wC+LsmRc5iJd9ro5awy8NkVGG7nhi1DmZzRWcT0vrC2QmWFuulHj4vZFx3V8zNp88cjqfvccDg+VPNChYz1xHund+8ZoL/CEifCkFmZRb2lcX7bp6d8ExMwwdN9qqwf66LwWUe0CmlcJ3DWNsyalAj8bO2Nw9bfpCDhTU47UXNylkVAhp7mXFXkFqC3/8YaIaKv0smE9OsCLDCY+JrWiBQ=
W9bIkTS+WbVyKEPeIH9Dpy3eII0tXaRphB2GmtKOcS+g9tI9HaSjxxl6H2HkcFT67mnXwFVnFomjwh8B9Px/10lOY7lNI9+vsw28Lhu8RFE=
amdModule.ts
///<amd-module name="NamedModule"/>
export class C {}
uMeMt/AxpNoZ/0hdN3LBU6RQdrp/Yf4D8Jb7be6Wx1CcC476i4J3XSMxHbQC4hzRv3kvx05uqSLA5kJ1DxVnBWYtT+5gM1DpAo3nfqJUuWQD0NROABOglB6IVWryWWbuM+vhiEsmljeB21YR2eGyVw==
amdModule.js
define("NamedModule", ["require", "exports"], function (require, exports) {
var C = (function () {
function C() {}
return C;
})();
exports.C = C;
});
/// <amd-dependency />
LmWbJ3CLCqJanxMeG5gpkSa15+H7KDMrwdFFO3PvW2TTjuFL2/bdsUocEldVk5AGfaCQNGTgzAa0ukLh909/5/vuqCholCRIGlomBHsS9w5pQ0K3z7g/VHpUGScfsQiNhKVWm2LMTupf0TYfhkJrXQ==
2WzGu3f23bzyiI3x0LBzICXoqemormfpvNpzQK4Cd/915mcEFA4+KZvxw6GKjR9X3xfg7eqNcJpxZ9NCw0I4q28yOsz46gEC+zuT5E8E/Ta/pBlIf19G0S4U99/zwk3q1LCDvs+ouQfw5Y3sKNCEogoRBLojAbO+qlj0wXLGXn7SusvBs/ffxOT+8Brppt0l
z5uWg0vBVrg2RpHn9B4Yp+VwjEV9s+FyYmehf6hB/eIJXIZ84PGns5c+M10WKbx35Havhh+Iqah+P/3u7+vsa7Da9GsDPnihVzVcZXYMnx9yUtH30siGhKMxSrLb1s/B8n9NJ6tA7q6n73dQz0IaOpr+j2fdA9j2GksaPORdJXJsdI1eUmWJ3z2mKvF9g3HH
/// <amd-dependency path="legacy/moduleA" name="moduleA"/>
declare var moduleA: MyType;
moduleA.callStuff();
p2Uz+4Qi4UrgVvriEG783b08esg98e1yqU2yPmzpzhQ=
define(["require", "exports", "legacy/moduleA"], function (
require,
exports,
moduleA
) {
moduleA.callStuff();
});