UNPKG

langflow-chatbot

Version:

Add a Langflow-powered chatbot to your website.

19 lines (18 loc) 1.06 kB
export type DatetimeHandler = (datetime: string) => string; /** * Creates a default datetime handler function. * This default handler can be configured with a format string at creation time. * @param format - The format string (e.g., 'relative', 'MM/dd/yyyy', or others supported by date-fns). * Defaults to 'relative' if not provided. * @returns A DatetimeHandler function. */ export declare function createDefaultDatetimeHandler(format?: string): DatetimeHandler; /** * Validates if a given handler function conforms to the new DatetimeHandler signature ((datetime: string) => string). * It checks if the handler is a function and can be called with a typical ISO date string * without throwing an error, and returns a string. * @param handler - The function to validate. * @returns True if the handler is a valid DatetimeHandler, false otherwise. */ export declare function isValidDatetimeHandler(handler: any): handler is DatetimeHandler; export declare function normalizeLangflowTimestamp(ts?: string): string | undefined;