@opentelemetry/core
Version:
OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.
17 lines • 567 B
text/typescript
//#region src/utils/callback.d.ts
/**
* Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.
*/
declare class BindOnceFuture<R, This = unknown, T extends (this: This, ...args: unknown[]) => R = () => R> {
private _isCalled;
private _deferred;
private _callback;
private _that;
constructor(callback: T, that: This);
get isCalled(): boolean;
get promise(): Promise<R>;
call(...args: Parameters<T>): Promise<R>;
}
//#endregion
export { BindOnceFuture };
//# sourceMappingURL=callback.d.mts.map