(file: GoalQueueFile, goalId: string)
| 217 | } |
| 218 | |
| 219 | function findGoalIndex(file: GoalQueueFile, goalId: string): number { |
| 220 | const index = file.goals.findIndex((goal) => goal.id === goalId); |
| 221 | if (index === -1) { |
| 222 | throw new KimiError(ErrorCodes.GOAL_NOT_FOUND, 'No queued goal found'); |
| 223 | } |
| 224 | return index; |
| 225 | } |
| 226 | |
| 227 | function isGoalQueueFile(value: unknown): value is GoalQueueFile { |
| 228 | if (!isRecord(value)) return false; |
no outgoing calls
no test coverage detected