@@ -8141,8 +8141,7 @@ export function createDetachedDiagnostic(fileName: string, start: number, length
81418141 assertDiagnosticLocation ( /*file*/ undefined , start , length ) ;
81428142 let text = getLocaleSpecificMessage ( message ) ;
81438143
8144- // TODO(jakebailey): would love to use length here; maybe use some instead?
8145- if ( args . length > 0 ) {
8144+ if ( some ( args ) ) {
81468145 text = formatStringFromArgs ( text , args ) ;
81478146 }
81488147
@@ -8212,8 +8211,7 @@ export function createFileDiagnostic(file: SourceFile, start: number, length: nu
82128211
82138212 let text = getLocaleSpecificMessage ( message ) ;
82148213
8215- // TODO(jakebailey): would love to use length here; maybe use some instead?
8216- if ( args . length > 0 ) {
8214+ if ( some ( args ) ) {
82178215 text = formatStringFromArgs ( text , args ) ;
82188216 }
82198217
@@ -8234,7 +8232,7 @@ export function createFileDiagnostic(file: SourceFile, start: number, length: nu
82348232export function formatMessage ( message : DiagnosticMessage , ...args : DiagnosticArguments ) : string {
82358233 let text = getLocaleSpecificMessage ( message ) ;
82368234
8237- if ( length ( args ) ) {
8235+ if ( some ( args ) ) {
82388236 text = formatStringFromArgs ( text , args ) ;
82398237 }
82408238
@@ -8245,7 +8243,7 @@ export function formatMessage(message: DiagnosticMessage, ...args: DiagnosticArg
82458243export function createCompilerDiagnostic ( message : DiagnosticMessage , ...args : DiagnosticArguments ) : Diagnostic {
82468244 let text = getLocaleSpecificMessage ( message ) ;
82478245
8248- if ( length ( args ) ) {
8246+ if ( some ( args ) ) {
82498247 text = formatStringFromArgs ( text , args ) ;
82508248 }
82518249
@@ -8280,7 +8278,7 @@ export function createCompilerDiagnosticFromMessageChain(chain: DiagnosticMessag
82808278export function chainDiagnosticMessages ( details : DiagnosticMessageChain | DiagnosticMessageChain [ ] | undefined , message : DiagnosticMessage , ...args : DiagnosticArguments ) : DiagnosticMessageChain {
82818279 let text = getLocaleSpecificMessage ( message ) ;
82828280
8283- if ( length ( args ) ) {
8281+ if ( some ( args ) ) {
82848282 text = formatStringFromArgs ( text , args ) ;
82858283 }
82868284 return {
0 commit comments