UNPKG

async-injection

Version:

A robust lightweight dependency injection library for TypeScript.

15 lines (14 loc) 721 B
/** * Returns true if the specified object looks like a JavaScript Error object. */ export declare function isErrorObj(err: any): err is Error; /** * Returns true if the specified value is "thenable" (aka a Promise). */ export declare function isPromise<T>(value: any): value is Promise<T>; /** * Simple helper function to find the @Release decorated method of an object (if any), and invoke it. * This is primarily an internal method as you probably know the exact method, and should invoke it yourself. * async-injection uses this helper to allow Singletons to clean up any non-garbage-collectable resources they may have allocated. */ export declare function InvokeReleaseMethod<T = unknown>(obj: T): boolean;