@foal/core
Version:
Full-featured Node.js framework, with no complexity
16 lines (15 loc) • 382 B
TypeScript
/**
* Service for running asynchronous functions.
*/
export declare class AsyncService {
private logger;
/**
* Run an asynchronous function without awaiting for it.
*
* If the function throws or rejects an error, the error is
* properly caught and logged.
*
* @param fn - The function to run.
*/
run(fn: () => Promise<any>): void;
}