/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { ITimeoutContext, type IAbortControllerContext } from "@fluidframework/server-services-client"; import { ITelemetryContextProperties, ITelemetryContext } from "@fluidframework/server-services-telemetry"; /** * @internal */ export declare class AsyncLocalStorageContextProvider { private readonly asyncLocalStorage; /** * Bind new properties to the asynchronous context. * If properties are a key-value record, new entries will be appended to the existing record. * Otherwise, the old context will be overwritten with the new context. */ bindContext(props: T, callback: () => void): void; /** * Get any properties bound to the asynchronous context. */ getContext(): T | undefined; } /** * AsyncLocalStorage based TelemetryContext implementation. * Callbacks are executed within an AsyncContext containing telemetry properties. * @internal */ export declare class AsyncLocalStorageTelemetryContext implements ITelemetryContext { private readonly contextProvider; getProperties(): Partial; bindProperties(props: Partial, callback: () => void): void; bindPropertiesAsync(props: Partial, callback: () => Promise): Promise; } /** * AsyncLocalStorage based TimeoutContext implementation. * Callbacks are executed within an AsyncContext containing timeout info. * @internal */ export declare class AsyncLocalStorageTimeoutContext implements ITimeoutContext { private readonly contextProvider; bindTimeout(maxDurationMs: number, callback: () => void): void; bindTimeoutAsync(maxDurationMs: number, callback: () => Promise): Promise; checkTimeout(): void; getTimeRemainingMs(): number | undefined; } export declare class AsyncLocalStorageAbortControllerContext implements IAbortControllerContext { private readonly contextProvider; bindAbortController(abortController: AbortController, callback: () => void): void; bindAbortControllerAsync(abortController: AbortController, callback: () => Promise): Promise; getAbortController(): AbortController | undefined; } //# sourceMappingURL=asyncContext.d.ts.map