Skip to content

Commit 075c733

Browse files
committed
Resolve todos
1 parent 9a70c29 commit 075c733

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/compiler/utilities.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
82348232
export 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
82458243
export 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
82808278
export 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

Comments
 (0)