Remove obsolute AMD logic from reference preprocessing in services

This commit is contained in:
Ryan Cavanaugh
2015-10-16 17:35:43 -07:00
parent 2f7719b61d
commit 61b71008d7
2 changed files with 1 additions and 63 deletions

View File

@@ -2351,21 +2351,7 @@ namespace ts {
while (token !== SyntaxKind.CloseBracketToken && token !== SyntaxKind.EndOfFileToken) {
// record string literals as module names
if (token === SyntaxKind.StringLiteral) {
const moduleName = scanner.getTokenValue();
// record first item in the list only if its name is not "require"
// record second item in the list only if its name is not "exports"
// record third item in the list only if its name is not "module"
// record all other items in the list unconditionally
const shouldRecordName =
i === 0
? moduleName !== "require"
: i === 1
? moduleName !== "exports"
: i !== 2 || moduleName !== "module";
if (shouldRecordName) {
recordModuleName();
}
recordModuleName();
i++;
}