File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -319,12 +319,14 @@ let handleUndefinedRecordFieldsAction = ({
319
319
file,
320
320
range,
321
321
diagnostic,
322
+ todoValue
322
323
} : {
323
324
recordFieldNames : string [ ] ;
324
325
codeActions : filesCodeActions ;
325
326
file : string ;
326
327
range : p . Range ;
327
328
diagnostic : p . Diagnostic ;
329
+ todoValue : string
328
330
} ) => {
329
331
if ( recordFieldNames != null ) {
330
332
codeActions [ file ] = codeActions [ file ] || [ ] ;
@@ -373,7 +375,7 @@ let handleUndefinedRecordFieldsAction = ({
373
375
newText += paddingContentRecordField ;
374
376
}
375
377
376
- newText += `${ fieldName } : failwith("TODO") ,\n` ;
378
+ newText += `${ fieldName } : ${ todoValue } ,\n` ;
377
379
} ) ;
378
380
379
381
// Let's put the end brace back where it was (we still have it to the direct right of us).
@@ -392,7 +394,7 @@ let handleUndefinedRecordFieldsAction = ({
392
394
}
393
395
394
396
newText += recordFieldNames
395
- . map ( ( fieldName ) => `${ fieldName } : failwith("TODO") ` )
397
+ . map ( ( fieldName ) => `${ fieldName } : ${ todoValue } ` )
396
398
. join ( ", " ) ;
397
399
}
398
400
@@ -450,6 +452,7 @@ let addUndefinedRecordFieldsV10: codeActionExtractor = ({
450
452
diagnostic,
451
453
file,
452
454
range,
455
+ todoValue : `failwith("TODO")`
453
456
} ) ;
454
457
}
455
458
@@ -496,6 +499,7 @@ let addUndefinedRecordFieldsV11: codeActionExtractor = ({
496
499
diagnostic,
497
500
file,
498
501
range,
502
+ todoValue : `%todo`
499
503
} ) ;
500
504
}
501
505
You can’t perform that action at this time.
0 commit comments