fix(40756): disable truncation for inferred type (#40764)

This commit is contained in:
Alex T
2020-09-25 23:01:08 +03:00
committed by GitHub
parent 8e86b24036
commit 73f5f02e97
2 changed files with 103 additions and 1 deletions

View File

@@ -2528,7 +2528,7 @@ namespace ts {
const checker = program.getTypeChecker();
let typeIsAccessible = true;
const notAccessible = () => { typeIsAccessible = false; };
const res = checker.typeToTypeNode(type, enclosingScope, /*flags*/ undefined, {
const res = checker.typeToTypeNode(type, enclosingScope, NodeBuilderFlags.NoTruncation, {
trackSymbol: (symbol, declaration, meaning) => {
typeIsAccessible = typeIsAccessible && checker.isSymbolAccessible(symbol, declaration, meaning, /*shouldComputeAliasToMarkVisible*/ false).accessibility === SymbolAccessibility.Accessible;
},