init
This commit is contained in:
38
node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts
generated
vendored
Normal file
38
node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { type IHttpOpts, type MatrixHttpApi } from "./http-api/index.ts";
|
||||
import { type Logger } from "./logger.ts";
|
||||
import { TypedEventEmitter } from "./models/typed-event-emitter.ts";
|
||||
/**
|
||||
* Manages storing and periodically refreshing the server capabilities.
|
||||
*/
|
||||
export declare abstract class CapabilityPoller<ResponseType> extends TypedEventEmitter<"update", {
|
||||
update: (data: ResponseType) => void;
|
||||
}> {
|
||||
protected readonly logger: Logger;
|
||||
protected readonly http: MatrixHttpApi<IHttpOpts & {
|
||||
onlyData: true;
|
||||
}>;
|
||||
private readonly name;
|
||||
protected cached?: ResponseType;
|
||||
private retryTimeout?;
|
||||
private refreshTimeout?;
|
||||
constructor(logger: Logger, http: MatrixHttpApi<IHttpOpts & {
|
||||
onlyData: true;
|
||||
}>, name: string);
|
||||
/**
|
||||
* Starts periodically fetching the server capabilities.
|
||||
*/
|
||||
start(): void;
|
||||
/**
|
||||
* Stops the service
|
||||
*/
|
||||
stop(): void;
|
||||
/**
|
||||
* Returns the cached capabilities, or undefined if none are cached.
|
||||
* @returns the current capabilities, if any.
|
||||
*/
|
||||
getCached(): ResponseType | undefined;
|
||||
abstract fetch(): Promise<ResponseType>;
|
||||
private poll;
|
||||
private clearTimeouts;
|
||||
}
|
||||
//# sourceMappingURL=capabilityPoller.d.ts.map
|
||||
Reference in New Issue
Block a user