mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Rename existing import declaration to ImportEqualsDeclaration
This commit is contained in:
@@ -276,10 +276,10 @@ module ts {
|
||||
|
||||
function processImportedModules(file: SourceFile, basePath: string) {
|
||||
forEach(file.statements, node => {
|
||||
if (isExternalModuleImportDeclaration(node) &&
|
||||
getExternalModuleImportDeclarationExpression(node).kind === SyntaxKind.StringLiteral) {
|
||||
if (isExternalModuleImportEqualsDeclaration(node) &&
|
||||
getExternalModuleImportEqualsDeclarationExpression(node).kind === SyntaxKind.StringLiteral) {
|
||||
|
||||
var nameLiteral = <LiteralExpression>getExternalModuleImportDeclarationExpression(node);
|
||||
var nameLiteral = <LiteralExpression>getExternalModuleImportEqualsDeclarationExpression(node);
|
||||
var moduleName = nameLiteral.text;
|
||||
if (moduleName) {
|
||||
var searchPath = basePath;
|
||||
@@ -304,10 +304,10 @@ module ts {
|
||||
// The StringLiteral must specify a top - level external module name.
|
||||
// Relative external module names are not permitted
|
||||
forEachChild((<ModuleDeclaration>node).body, node => {
|
||||
if (isExternalModuleImportDeclaration(node) &&
|
||||
getExternalModuleImportDeclarationExpression(node).kind === SyntaxKind.StringLiteral) {
|
||||
if (isExternalModuleImportEqualsDeclaration(node) &&
|
||||
getExternalModuleImportEqualsDeclarationExpression(node).kind === SyntaxKind.StringLiteral) {
|
||||
|
||||
var nameLiteral = <LiteralExpression>getExternalModuleImportDeclarationExpression(node);
|
||||
var nameLiteral = <LiteralExpression>getExternalModuleImportEqualsDeclarationExpression(node);
|
||||
var moduleName = nameLiteral.text;
|
||||
if (moduleName) {
|
||||
// TypeScript 1.0 spec (April 2014): 12.1.6
|
||||
|
||||
Reference in New Issue
Block a user