MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / isUpcomingGoal

Function isUpcomingGoal

apps/kimi-code/src/tui/goal-queue-store.ts:236–244  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

234}
235
236function isUpcomingGoal(value: unknown): value is UpcomingGoal {
237 if (!isRecord(value)) return false;
238 return (
239 isNonEmptyString(value['id']) &&
240 isNonEmptyString(value['objective']) &&
241 isNonEmptyString(value['createdAt']) &&
242 isNonEmptyString(value['updatedAt'])
243 );
244}
245
246function isRecord(value: unknown): value is Record<string, unknown> {
247 return typeof value === 'object' && value !== null && !Array.isArray(value);

Callers

nothing calls this directly

Calls 2

isRecordFunction · 0.70
isNonEmptyStringFunction · 0.70

Tested by

no test coverage detected