@microsoft/teams-js
Version:
Microsoft Client SDK for building app for Microsoft hosts
40 lines (39 loc) • 1.13 kB
TypeScript
/**
* @hidden
* @beta
*
* Fetches a MessagePort to batch telemetry through the host's telemetry worker.
* The port is cached once received, so subsequent calls return the same port.
* @returns MessagePort.
*
* @throws Error if {@linkcode app.initialize} has not successfully completed,
* if the host does not support the feature, or if the port request is rejected.
*
* @internal
* Limited to Microsoft-internal use
*/
export declare function getTelemetryPort(): Promise<MessagePort>;
/**
* @hidden
*
* @beta
*
* Checks if the messageChannels.telemetry capability is supported by the host
* @returns boolean to represent whether the messageChannels.telemetry capability is supported
*
* @throws Error if {@linkcode app.initialize} has not successfully completed
*
* @internal
* Limited to Microsoft-internal use
*/
export declare function isSupported(): boolean;
/**
* @hidden
* Undocumented function used to clear state between unit tests
*
* @beta
*
* @internal
* Limited to Microsoft-internal use
*/
export declare function _clearTelemetryPort(): void;