Fix regression in mixin emit by removing unneeded line of code (#34715)

* Fix regression in mixin emit by removing unneeded line of code

* Double the test, double the fun
This commit is contained in:
Wesley Wigham
2019-10-24 14:02:37 -07:00
committed by GitHub
parent d892fd408f
commit 7cfa1dfb8a
5 changed files with 316 additions and 2 deletions
-2
View File
@@ -4092,8 +4092,6 @@ namespace ts {
else if (context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral &&
type.symbol.valueDeclaration &&
isClassLike(type.symbol.valueDeclaration) &&
// Use `import` types for refs to other scopes, only anonymize something defined in the same scope
findAncestor(type.symbol.valueDeclaration, d => d === getSourceFileOfNode(context.enclosingDeclaration)) &&
!isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)
) {
return createAnonymousTypeNode(type);