UNPKG

syphonx-core

Version:

SyphonX is a template-driven solution for extracting data from HTML in a highly efficient way. It combines the power of jQuery, Regular Expressions, and Javascript into a declarative template-driven format that extracts and reshapes HTML data into JSON.

12 lines (11 loc) 377 B
export interface AttemptOptions { retries?: number; retryDelay?: number[]; rethrow?: boolean; quiet?: boolean; } export interface AttemptResult<T = unknown> { result?: T; error?: any; } export declare function attempt<T = unknown>(onTry: () => Promise<T>, onBeforeRetry?: (err: unknown) => boolean, options?: AttemptOptions): Promise<AttemptResult<T>>;