File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2761,16 +2761,17 @@ export function isFirstDeclarationOfSymbolParameter(symbol: Symbol): boolean {
27612761 return ! ! findAncestor ( declaration , n => isParameter ( n ) ? true : isBindingElement ( n ) || isObjectBindingPattern ( n ) || isArrayBindingPattern ( n ) ? false : "quit" ) ;
27622762}
27632763
2764- const displayPartWriterCache = new Map < number | undefined , DisplayPartsSymbolWriter > ( ) ;
2764+ const displayPartWriterCache = new Map < number , DisplayPartsSymbolWriter > ( ) ;
27652765function getDisplayPartWriter ( maximumLength : number | undefined ) : DisplayPartsSymbolWriter {
2766+ maximumLength = maximumLength || defaultMaximumTruncationLength ;
27662767 if ( ! displayPartWriterCache . has ( maximumLength ) ) {
27672768 displayPartWriterCache . set ( maximumLength , getDisplayPartWriterWorker ( maximumLength ) ) ;
27682769 }
27692770 return displayPartWriterCache . get ( maximumLength ) ! ;
27702771}
27712772
2772- function getDisplayPartWriterWorker ( maximumLength : number | undefined ) : DisplayPartsSymbolWriter {
2773- const absoluteMaximumLength = ( maximumLength || defaultMaximumTruncationLength ) * 10 ; // A hard cutoff to avoid overloading the messaging channel in worst-case scenarios
2773+ function getDisplayPartWriterWorker ( maximumLength : number ) : DisplayPartsSymbolWriter {
2774+ const absoluteMaximumLength = maximumLength * 10 ; // A hard cutoff to avoid overloading the messaging channel in worst-case scenarios
27742775 let displayParts : SymbolDisplayPart [ ] ;
27752776 let lineStart : boolean ;
27762777 let indent : number ;
You can’t perform that action at this time.
0 commit comments