mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
Emit amd-module and amd-dependency comments in emitter if printing declaration comments (#22740)
* Emit amd-module and amd-dependency comments in emitter if printing declaration comments * Move code a bit * Move again
This commit is contained in:
@@ -2481,6 +2481,21 @@ namespace ts {
|
||||
}
|
||||
|
||||
function emitTripleSlashDirectives(files: ReadonlyArray<FileReference>, types: ReadonlyArray<FileReference>) {
|
||||
if (currentSourceFile && currentSourceFile.moduleName) {
|
||||
write(`/// <amd-module name="${currentSourceFile.moduleName}" />`);
|
||||
writeLine();
|
||||
}
|
||||
if (currentSourceFile && currentSourceFile.amdDependencies) {
|
||||
for (const dep of currentSourceFile.amdDependencies) {
|
||||
if (dep.name) {
|
||||
write(`/// <amd-dependency name="${dep.name}" path="${dep.path}" />`);
|
||||
}
|
||||
else {
|
||||
write(`/// <amd-dependency path="${dep.path}" />`);
|
||||
}
|
||||
writeLine();
|
||||
}
|
||||
}
|
||||
for (const directive of files) {
|
||||
write(`/// <reference path="${directive.fileName}" />`);
|
||||
writeLine();
|
||||
|
||||
Reference in New Issue
Block a user