disposable-cls
Version:
Provides disposable continuation local storage for Node.js.
31 lines (30 loc) • 829 B
TypeScript
/**
* Represents a very simple object.
*/
export declare class SimpleMockObject {
}
/**
* Represents a very simple 'disposable' object.
*/
export declare class SimpleDisposableMockObject {
private disposeCallback;
private _id;
/**
* Initializes a new instance of a disposable mock object.
*
* @param disposeCallback The callback that will be called when the current object
* is being disposed.
*/
constructor(disposeCallback: Function);
/**
* Gets the identifier if the current mock object.
*
* @returns A number that uniquely identifies this mock object.
*/
id: number;
/**
* A dispose method that should be invoked by the context stack then this mock object
* goes out of scope.
*/
dispose(): void;
}