mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 22:15:18 -05:00
fix: do not match MySymbol.import("mod")
This commit is contained in:
@@ -78,7 +78,7 @@ namespace ts {
|
||||
*/
|
||||
function tryConsumeImport(): boolean {
|
||||
let token = scanner.getToken();
|
||||
if (token === SyntaxKind.ImportKeyword) {
|
||||
if (token === SyntaxKind.ImportKeyword && !scanner.hasPrecedingDot()) {
|
||||
token = nextToken();
|
||||
if (token === SyntaxKind.OpenParenToken) {
|
||||
token = nextToken();
|
||||
@@ -293,6 +293,9 @@ namespace ts {
|
||||
// export import i = require("mod")
|
||||
// (for JavaScript files) require("mod")
|
||||
|
||||
// Do not look for:
|
||||
// AnySymbol.import("mod")
|
||||
|
||||
while (true) {
|
||||
if (scanner.getToken() === SyntaxKind.EndOfFileToken) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user