File tree Expand file tree Collapse file tree
Open diff view settings
Expand file tree Collapse file tree
Open diff view settings
Original file line number Diff line number Diff line change @@ -4010,7 +4010,7 @@ namespace ts {
40104010 printer.writeNode(EmitHint.Unspecified, typeNode, /*sourceFile*/ sourceFile, writer);
40114011 const result = writer.getText();
40124012
4013- const maxLength = noTruncation ? undefined : defaultMaximumTruncationLength * 2;
4013+ const maxLength = noTruncation ? noTruncationMaximumTruncationLength * 2 : defaultMaximumTruncationLength * 2;
40144014 if (maxLength && result && result.length >= maxLength) {
40154015 return result.substr(0, maxLength - "...".length) + "...";
40164016 }
@@ -4083,7 +4083,7 @@ namespace ts {
40834083
40844084 function checkTruncationLength(context: NodeBuilderContext): boolean {
40854085 if (context.truncating) return context.truncating;
4086- return context.truncating = !( context.flags & NodeBuilderFlags.NoTruncation) && context.approximateLength > defaultMaximumTruncationLength;
4086+ return context.truncating = context.approximateLength > (( context.flags & NodeBuilderFlags.NoTruncation) ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength) ;
40874087 }
40884088
40894089 function typeToTypeNodeHelper(type: Type, context: NodeBuilderContext): TypeNode {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ namespace ts {
77 export const externalHelpersModuleNameText = "tslib" ;
88
99 export const defaultMaximumTruncationLength = 160 ;
10+ export const noTruncationMaximumTruncationLength = 1_000_000 ;
1011
1112 export function getDeclarationOfKind < T extends Declaration > ( symbol : Symbol , kind : T [ "kind" ] ) : T | undefined {
1213 const declarations = symbol . declarations ;
You can’t perform that action at this time.
0 commit comments