UNPKG

@fal-ai/serverless-client

Version:

Deprecation note: this library has been deprecated in favor of @fal-ai/client

30 lines (29 loc) 1.3 kB
export declare function ensureAppIdFormat(id: string): string; declare const APP_NAMESPACES: readonly ["workflows", "comfy"]; type AppNamespace = (typeof APP_NAMESPACES)[number]; export type AppId = { readonly owner: string; readonly alias: string; readonly path?: string; readonly namespace?: AppNamespace; }; export declare function parseAppId(id: string): AppId; export declare function isValidUrl(url: string): boolean; export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number, leading?: boolean): (...funcArgs: Parameters<T>) => ReturnType<T> | void; /** * Not really the most optimal way to detect if we're running in React, * but the idea here is that we can support multiple rendering engines * (starting with React), with all their peculiarities, without having * to add a dependency or creating custom integrations (e.g. custom hooks). * * Yes, a bit of magic to make things works out-of-the-box. * @returns `true` if running in React, `false` otherwise. */ export declare function isReact(): boolean; /** * Check if a value is a plain object. * @param value - The value to check. * @returns `true` if the value is a plain object, `false` otherwise. */ export declare function isPlainObject(value: any): boolean; export {};