From 965b98f6cbaa7c23246a3bb59d5d707bd6b5164e Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Mon, 8 May 2017 11:10:47 -0700 Subject: [PATCH] `UseFullyQualifiedType` --- src/compiler/checker.ts | 2 +- src/compiler/types.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 64adede088e..8a84fe42515 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2834,7 +2834,7 @@ namespace ts { // Try to get qualified name if the symbol is not a type parameter and there is an enclosing declaration. let chain: Symbol[]; const isTypeParameter = symbol.flags & SymbolFlags.TypeParameter; - if (!isTypeParameter && context.enclosingDeclaration) { + if (!isTypeParameter && (context.enclosingDeclaration || context.flags & NodeBuilderFlags.UseFullyQualifiedType)) { chain = getSymbolChain(symbol, meaning, /*endOfChain*/ true); Debug.assert(chain && chain.length > 0); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 48c4b2cd4ac..6c1861a5892 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2571,7 +2571,6 @@ namespace ts { WriteOwnNameForAnyLike = 1 << 4, // Write symbol's own name instead of 'any' for any like types (eg. unknown, __resolving__ etc) // TODO WriteTypeArgumentsOfSignature = 1 << 5, // Write the type arguments instead of type parameters of the signature - // TODO UseFullyQualifiedType = 1 << 6, // Write out the fully qualified type name (eg. Module.Type, instead of Type) // TODO UseTypeAliasValue = 1 << 7, // Serialize the type instead of using type-alias. This is needed when we emit declaration file.