mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Merge branch 'master' into release-2.1
This commit is contained in:
@@ -466,9 +466,7 @@ namespace ts {
|
||||
// other kinds of value declarations take precedence over modules
|
||||
target.valueDeclaration = source.valueDeclaration;
|
||||
}
|
||||
forEach(source.declarations, node => {
|
||||
target.declarations.push(node);
|
||||
});
|
||||
addRange(target.declarations, source.declarations);
|
||||
if (source.members) {
|
||||
if (!target.members) target.members = createMap<Symbol>();
|
||||
mergeSymbolTable(target.members, source.members);
|
||||
@@ -1100,7 +1098,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
function getDeclarationOfAliasSymbol(symbol: Symbol): Declaration | undefined {
|
||||
return forEach(symbol.declarations, d => isAliasSymbolDeclaration(d) ? d : undefined);
|
||||
return find<Declaration>(symbol.declarations, isAliasSymbolDeclaration);
|
||||
}
|
||||
|
||||
function getTargetOfImportEqualsDeclaration(node: ImportEqualsDeclaration): Symbol {
|
||||
|
||||
@@ -1024,8 +1024,11 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
// Return the result if we have an immediate super() call on the last statement.
|
||||
if (superCallExpression && statementOffset === ctorStatements.length - 1) {
|
||||
// Return the result if we have an immediate super() call on the last statement,
|
||||
// but only if the constructor itself doesn't use 'this' elsewhere.
|
||||
if (superCallExpression
|
||||
&& statementOffset === ctorStatements.length - 1
|
||||
&& !(ctor.transformFlags & (TransformFlags.ContainsLexicalThis | TransformFlags.ContainsCapturedLexicalThis))) {
|
||||
const returnStatement = createReturn(superCallExpression);
|
||||
|
||||
if (superCallExpression.kind !== SyntaxKind.BinaryExpression
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace ts.JsDoc {
|
||||
"lends",
|
||||
"link",
|
||||
"memberOf",
|
||||
"method",
|
||||
"name",
|
||||
"namespace",
|
||||
"param",
|
||||
|
||||
@@ -616,9 +616,8 @@ namespace ts {
|
||||
else {
|
||||
declarations.push(functionDeclaration);
|
||||
}
|
||||
|
||||
forEachChild(node, visit);
|
||||
}
|
||||
forEachChild(node, visit);
|
||||
break;
|
||||
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
|
||||
Reference in New Issue
Block a user