mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'es6Import' into es6ImportDts
This commit is contained in:
@@ -654,12 +654,12 @@ module ts {
|
||||
|
||||
function getExportAssignmentSymbol(symbol: Symbol): Symbol {
|
||||
checkTypeOfExportAssignmentSymbol(symbol);
|
||||
return getSymbolLinks(symbol).exportAssignSymbol;
|
||||
return getSymbolLinks(symbol).exportAssignmentSymbol;
|
||||
}
|
||||
|
||||
function checkTypeOfExportAssignmentSymbol(containerSymbol: Symbol): void {
|
||||
var symbolLinks = getSymbolLinks(containerSymbol);
|
||||
if (!symbolLinks.exportAssignChecked) {
|
||||
if (!symbolLinks.exportAssignmentChecked) {
|
||||
var exportInformation = collectExportInformationForSourceFileOrModule(containerSymbol);
|
||||
if (exportInformation.exportAssignments.length) {
|
||||
if (exportInformation.exportAssignments.length > 1) {
|
||||
@@ -679,9 +679,9 @@ module ts {
|
||||
var meaning = SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace;
|
||||
var exportSymbol = resolveName(node, node.exportName.text, meaning, Diagnostics.Cannot_find_name_0, node.exportName);
|
||||
}
|
||||
symbolLinks.exportAssignSymbol = exportSymbol || unknownSymbol;
|
||||
symbolLinks.exportAssignmentSymbol = exportSymbol || unknownSymbol;
|
||||
}
|
||||
symbolLinks.exportAssignChecked = true;
|
||||
symbolLinks.exportAssignmentChecked = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10187,7 +10187,7 @@ module ts {
|
||||
if (baseName.charCodeAt(0) !== CharacterCodes._) {
|
||||
var baseName = "_" + baseName;
|
||||
if (!isExistingName(baseName)) {
|
||||
return baseName;
|
||||
return generatedNames[baseName] = baseName;
|
||||
}
|
||||
}
|
||||
// Find the first unique '_name_n', where n is a positive number
|
||||
@@ -10198,14 +10198,13 @@ module ts {
|
||||
while (true) {
|
||||
name = baseName + i;
|
||||
if (!isExistingName(name)) {
|
||||
return name;
|
||||
return generatedNames[name] = name;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
function assignGeneratedName(node: Node, name: string) {
|
||||
generatedNames[name] = name;
|
||||
getNodeLinks(node).generatedName = unescapeIdentifier(name);
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -1273,19 +1273,19 @@ module ts {
|
||||
members?: SymbolTable; // Class, interface or literal instance members
|
||||
exports?: SymbolTable; // Module exports
|
||||
exportSymbol?: Symbol; // Exported symbol associated with this symbol
|
||||
valueDeclaration?: Declaration // First value declaration of the symbol,
|
||||
constEnumOnlyModule?: boolean // For modules - if true - module contains only const enums or other modules with only const enums.
|
||||
valueDeclaration?: Declaration // First value declaration of the symbol
|
||||
constEnumOnlyModule?: boolean // True if module contains only const enums or other modules with only const enums
|
||||
}
|
||||
|
||||
export interface SymbolLinks {
|
||||
target?: Symbol; // Resolved (non-alias) target of an alias
|
||||
type?: Type; // Type of value symbol
|
||||
declaredType?: Type; // Type of class, interface, enum, or type parameter
|
||||
mapper?: TypeMapper; // Type mapper for instantiation alias
|
||||
referenced?: boolean; // True if alias symbol has been referenced as a value
|
||||
exportAssignChecked?: boolean; // True if export assignment was checked
|
||||
exportAssignSymbol?: Symbol; // Symbol exported from external module
|
||||
unionType?: UnionType; // Containing union type for union property
|
||||
target?: Symbol; // Resolved (non-alias) target of an alias
|
||||
type?: Type; // Type of value symbol
|
||||
declaredType?: Type; // Type of class, interface, enum, or type parameter
|
||||
mapper?: TypeMapper; // Type mapper for instantiation alias
|
||||
referenced?: boolean; // True if alias symbol has been referenced as a value
|
||||
exportAssignmentChecked?: boolean; // True if export assignment was checked
|
||||
exportAssignmentSymbol?: Symbol; // Symbol exported from external module
|
||||
unionType?: UnionType; // Containing union type for union property
|
||||
}
|
||||
|
||||
export interface TransientSymbol extends Symbol, SymbolLinks { }
|
||||
|
||||
@@ -1003,8 +1003,8 @@ declare module "typescript" {
|
||||
declaredType?: Type;
|
||||
mapper?: TypeMapper;
|
||||
referenced?: boolean;
|
||||
exportAssignChecked?: boolean;
|
||||
exportAssignSymbol?: Symbol;
|
||||
exportAssignmentChecked?: boolean;
|
||||
exportAssignmentSymbol?: Symbol;
|
||||
unionType?: UnionType;
|
||||
}
|
||||
interface TransientSymbol extends Symbol, SymbolLinks {
|
||||
|
||||
@@ -3247,11 +3247,11 @@ declare module "typescript" {
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getSourceFile(fileName: string): SourceFile;
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
>fileName : string
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
|
||||
interface TypeChecker {
|
||||
|
||||
|
||||
@@ -1034,8 +1034,8 @@ declare module "typescript" {
|
||||
declaredType?: Type;
|
||||
mapper?: TypeMapper;
|
||||
referenced?: boolean;
|
||||
exportAssignChecked?: boolean;
|
||||
exportAssignSymbol?: Symbol;
|
||||
exportAssignmentChecked?: boolean;
|
||||
exportAssignmentSymbol?: Symbol;
|
||||
unionType?: UnionType;
|
||||
}
|
||||
interface TransientSymbol extends Symbol, SymbolLinks {
|
||||
|
||||
@@ -3391,11 +3391,11 @@ declare module "typescript" {
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getSourceFile(fileName: string): SourceFile;
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
>fileName : string
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
|
||||
interface TypeChecker {
|
||||
|
||||
|
||||
@@ -1035,8 +1035,8 @@ declare module "typescript" {
|
||||
declaredType?: Type;
|
||||
mapper?: TypeMapper;
|
||||
referenced?: boolean;
|
||||
exportAssignChecked?: boolean;
|
||||
exportAssignSymbol?: Symbol;
|
||||
exportAssignmentChecked?: boolean;
|
||||
exportAssignmentSymbol?: Symbol;
|
||||
unionType?: UnionType;
|
||||
}
|
||||
interface TransientSymbol extends Symbol, SymbolLinks {
|
||||
|
||||
@@ -3343,11 +3343,11 @@ declare module "typescript" {
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getSourceFile(fileName: string): SourceFile;
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
>fileName : string
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
|
||||
interface TypeChecker {
|
||||
|
||||
|
||||
@@ -1072,8 +1072,8 @@ declare module "typescript" {
|
||||
declaredType?: Type;
|
||||
mapper?: TypeMapper;
|
||||
referenced?: boolean;
|
||||
exportAssignChecked?: boolean;
|
||||
exportAssignSymbol?: Symbol;
|
||||
exportAssignmentChecked?: boolean;
|
||||
exportAssignmentSymbol?: Symbol;
|
||||
unionType?: UnionType;
|
||||
}
|
||||
interface TransientSymbol extends Symbol, SymbolLinks {
|
||||
|
||||
@@ -3516,11 +3516,11 @@ declare module "typescript" {
|
||||
>SourceFile : SourceFile
|
||||
|
||||
getSourceFile(fileName: string): SourceFile;
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
|
||||
>getSourceFile : (fileName: string) => SourceFile
|
||||
>fileName : string
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
>SourceFile : SourceFile
|
||||
}
|
||||
|
||||
interface TypeChecker {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user