mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
Remove obsolute AMD logic from reference preprocessing in services
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user