UNPKG

adk-typescript

Version:

TypeScript port of Google's Agent Development Kit (ADK)

50 lines (49 loc) 1.2 kB
/** * Utils module - Provides utility functions and helpers */ /** * Format a date to ISO string * @param date Date to format * @returns Formatted date string */ export declare function formatDate(date?: Date): string; /** * Sleep for a specified number of milliseconds * @param ms Milliseconds to sleep * @returns Promise that resolves after the specified time */ export declare function sleep(ms: number): Promise<void>; /** * Deep clone an object * @param obj Object to clone * @returns Cloned object */ export declare function deepClone<T>(obj: T): T; /** * Generate a random ID * @param length Length of the ID (default: 10) * @returns Random ID string */ export declare function generateId(length?: number): string; /** * Logger utility */ export declare class Logger { private prefix; constructor(prefix?: string); /** * Log an informational message * @param message Message to log */ info(message: string): void; /** * Log a warning message * @param message Message to log */ warn(message: string): void; /** * Log an error message * @param message Message to log */ error(message: string): void; }