(task: TaskInfo)
| 3455 | } |
| 3456 | |
| 3457 | function copyTaskInfo(task: TaskInfo): TaskInfo { |
| 3458 | const copy = { ...task }; |
| 3459 | |
| 3460 | if (task.tags) { |
| 3461 | copy.tags = [...task.tags]; |
| 3462 | } |
| 3463 | if (task.contexts) { |
| 3464 | copy.contexts = [...task.contexts]; |
| 3465 | } |
| 3466 | if (task.projects) { |
| 3467 | copy.projects = [...task.projects]; |
| 3468 | } |
| 3469 | if (task.complete_instances) { |
| 3470 | copy.complete_instances = [...task.complete_instances]; |
| 3471 | } |
| 3472 | if (task.skipped_instances) { |
| 3473 | copy.skipped_instances = [...task.skipped_instances]; |
| 3474 | } |
| 3475 | if (task.icsEventId) { |
| 3476 | copy.icsEventId = [...task.icsEventId]; |
| 3477 | } |
| 3478 | if (task.googleCalendarMovedOriginalDates) { |
| 3479 | copy.googleCalendarMovedOriginalDates = [...task.googleCalendarMovedOriginalDates]; |
| 3480 | } |
| 3481 | if (task.reminders) { |
| 3482 | copy.reminders = task.reminders.map((reminder) => ({ ...reminder })); |
| 3483 | } |
| 3484 | if (task.timeEntries) { |
| 3485 | copy.timeEntries = task.timeEntries.map((entry) => ({ ...entry })); |
| 3486 | } |
| 3487 | if (task.blockedBy) { |
| 3488 | copy.blockedBy = task.blockedBy.map((dependency) => ({ ...dependency })); |
| 3489 | } |
| 3490 | if (task.blocking) { |
| 3491 | copy.blocking = [...task.blocking]; |
| 3492 | } |
| 3493 | if (task.customProperties) { |
| 3494 | copy.customProperties = { ...task.customProperties }; |
| 3495 | } |
| 3496 | |
| 3497 | return copy; |
| 3498 | } |
no outgoing calls
no test coverage detected