"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__tsfTypeAliases = exports.SrpcStreamClosedError = exports.SrpcBackpressureError = exports.SrpcMeshAuthenticationError = exports.SrpcMeshProtocolError = exports.SrpcIndeterminateDeliveryError = exports.SrpcOwnerUnavailableError = exports.SrpcStaleConnectionError = exports.SrpcClientNotFoundError = exports.SrpcError = void 0;
exports.serializeSrpcError = serializeSrpcError;
exports.isSrpcMessageHandlerClass = isSrpcMessageHandlerClass;
exports.encodeSrpcMessage = encodeSrpcMessage;
const tslib_1 = require("tslib");
const _a = tslib_1.__importStar(require("@zyno-io/ts-server-foundation/type-metadata-runtime"));
const __tsf_metadata_type = _a.createCompactMetadataRegistryV1("[1,[{\"kind\":6},{\"kind\":8},{\"kind\":2}]]", []);
let _SrpcErrorMetadata_1;
class SrpcError extends Error {
    isUserError;
    constructor(message, isUserError) {
        super(message);
        this.isUserError = isUserError;
        this.name = 'SrpcError';
    }
    static __tsfType = _SrpcErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcError\",\"typeName\":\"SrpcError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"message\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"isUserError\",\"type\":{\"$tsfType\":1},\"optional\":true,\"default\":false}]}]", [() => SrpcError], __tsf_metadata_type);
}
exports.SrpcError = SrpcError;
_SrpcErrorMetadata_1.classType = SrpcError;
SrpcError.__tsfType = _SrpcErrorMetadata_1;
/** Preserve the explicit sRPC error contract without promoting ordinary errors. */
function serializeSrpcError(error) {
    const isSrpcError = error instanceof SrpcError;
    const message = isSrpcError ? error.message : String(error);
    const userError = isSrpcError && typeof error.isUserError === 'boolean' ? error.isUserError : undefined;
    return {
        error: message,
        ...(userError === undefined ? {} : { userError })
    };
}
let _SrpcClientNotFoundErrorMetadata_1;
class SrpcClientNotFoundError extends Error {
    constructor(clientId) {
        super(`sRPC client not found: ${clientId}`);
        this.name = 'SrpcClientNotFoundError';
    }
    static __tsfType = _SrpcClientNotFoundErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcClientNotFoundError\",\"typeName\":\"SrpcClientNotFoundError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}]}]", [() => SrpcClientNotFoundError], __tsf_metadata_type);
}
exports.SrpcClientNotFoundError = SrpcClientNotFoundError;
_SrpcClientNotFoundErrorMetadata_1.classType = SrpcClientNotFoundError;
SrpcClientNotFoundError.__tsfType = _SrpcClientNotFoundErrorMetadata_1;
let _SrpcStaleConnectionErrorMetadata_1;
class SrpcStaleConnectionError extends Error {
    constructor(clientId) {
        super(`sRPC client connection is stale: ${clientId}`);
        this.name = 'SrpcStaleConnectionError';
    }
    static __tsfType = _SrpcStaleConnectionErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcStaleConnectionError\",\"typeName\":\"SrpcStaleConnectionError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}]}]", [() => SrpcStaleConnectionError], __tsf_metadata_type);
}
exports.SrpcStaleConnectionError = SrpcStaleConnectionError;
_SrpcStaleConnectionErrorMetadata_1.classType = SrpcStaleConnectionError;
SrpcStaleConnectionError.__tsfType = _SrpcStaleConnectionErrorMetadata_1;
let _SrpcOwnerUnavailableErrorMetadata_1;
class SrpcOwnerUnavailableError extends Error {
    constructor(clientId, cause) {
        super(`sRPC client owner is unavailable: ${clientId}`, { cause });
        this.name = 'SrpcOwnerUnavailableError';
    }
    static __tsfType = _SrpcOwnerUnavailableErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcOwnerUnavailableError\",\"typeName\":\"SrpcOwnerUnavailableError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"cause\",\"type\":{\"$tsfType\":2},\"optional\":true,\"default\":false}]}]", [() => SrpcOwnerUnavailableError], __tsf_metadata_type);
}
exports.SrpcOwnerUnavailableError = SrpcOwnerUnavailableError;
_SrpcOwnerUnavailableErrorMetadata_1.classType = SrpcOwnerUnavailableError;
SrpcOwnerUnavailableError.__tsfType = _SrpcOwnerUnavailableErrorMetadata_1;
let _SrpcIndeterminateDeliveryErrorMetadata_1;
class SrpcIndeterminateDeliveryError extends Error {
    constructor(clientId, cause) {
        super(`sRPC invocation delivery is indeterminate: ${clientId}`, { cause });
        this.name = 'SrpcIndeterminateDeliveryError';
    }
    static __tsfType = _SrpcIndeterminateDeliveryErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcIndeterminateDeliveryError\",\"typeName\":\"SrpcIndeterminateDeliveryError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"clientId\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false},{\"name\":\"cause\",\"type\":{\"$tsfType\":2},\"optional\":true,\"default\":false}]}]", [() => SrpcIndeterminateDeliveryError], __tsf_metadata_type);
}
exports.SrpcIndeterminateDeliveryError = SrpcIndeterminateDeliveryError;
_SrpcIndeterminateDeliveryErrorMetadata_1.classType = SrpcIndeterminateDeliveryError;
SrpcIndeterminateDeliveryError.__tsfType = _SrpcIndeterminateDeliveryErrorMetadata_1;
let _SrpcMeshProtocolErrorMetadata_1;
class SrpcMeshProtocolError extends Error {
    constructor(message) {
        super(message);
        this.name = 'SrpcMeshProtocolError';
    }
    static __tsfType = _SrpcMeshProtocolErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcMeshProtocolError\",\"typeName\":\"SrpcMeshProtocolError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"message\",\"type\":{\"$tsfType\":0},\"optional\":false,\"default\":false}]}]", [() => SrpcMeshProtocolError], __tsf_metadata_type);
}
exports.SrpcMeshProtocolError = SrpcMeshProtocolError;
_SrpcMeshProtocolErrorMetadata_1.classType = SrpcMeshProtocolError;
SrpcMeshProtocolError.__tsfType = _SrpcMeshProtocolErrorMetadata_1;
let _SrpcMeshAuthenticationErrorMetadata_1;
class SrpcMeshAuthenticationError extends Error {
    constructor(message = 'sRPC mesh peer authentication failed') {
        super(message);
        this.name = 'SrpcMeshAuthenticationError';
    }
    static __tsfType = _SrpcMeshAuthenticationErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcMeshAuthenticationError\",\"typeName\":\"SrpcMeshAuthenticationError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"message\",\"type\":{\"$tsfType\":2},\"optional\":true,\"default\":true}]}]", [() => SrpcMeshAuthenticationError], __tsf_metadata_type);
}
exports.SrpcMeshAuthenticationError = SrpcMeshAuthenticationError;
_SrpcMeshAuthenticationErrorMetadata_1.classType = SrpcMeshAuthenticationError;
SrpcMeshAuthenticationError.__tsfType = _SrpcMeshAuthenticationErrorMetadata_1;
let _SrpcBackpressureErrorMetadata_1;
class SrpcBackpressureError extends Error {
    constructor(message = 'sRPC mesh backpressure limit exceeded') {
        super(message);
        this.name = 'SrpcBackpressureError';
    }
    static __tsfType = _SrpcBackpressureErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcBackpressureError\",\"typeName\":\"SrpcBackpressureError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"message\",\"type\":{\"$tsfType\":2},\"optional\":true,\"default\":true}]}]", [() => SrpcBackpressureError], __tsf_metadata_type);
}
exports.SrpcBackpressureError = SrpcBackpressureError;
_SrpcBackpressureErrorMetadata_1.classType = SrpcBackpressureError;
SrpcBackpressureError.__tsfType = _SrpcBackpressureErrorMetadata_1;
let _SrpcStreamClosedErrorMetadata_1;
class SrpcStreamClosedError extends Error {
    constructor(message = 'sRPC byte stream is closed') {
        super(message);
        this.name = 'SrpcStreamClosedError';
    }
    static __tsfType = _SrpcStreamClosedErrorMetadata_1 = _a.decodeCompactMetadataV1("[1,{\"kind\":16,\"name\":\"SrpcStreamClosedError\",\"typeName\":\"SrpcStreamClosedError\",\"classType\":{\"$tsf\":0},\"properties\":[],\"methods\":[],\"hasConstructor\":true,\"constructorParameters\":[{\"name\":\"message\",\"type\":{\"$tsfType\":2},\"optional\":true,\"default\":true}]}]", [() => SrpcStreamClosedError], __tsf_metadata_type);
}
exports.SrpcStreamClosedError = SrpcStreamClosedError;
_SrpcStreamClosedErrorMetadata_1.classType = SrpcStreamClosedError;
SrpcStreamClosedError.__tsfType = _SrpcStreamClosedErrorMetadata_1;
function isSrpcMessageHandlerClass(handler) {
    return typeof handler === 'function' && typeof handler.prototype?.handle === 'function';
}
function encodeSrpcMessage(codec, message) {
    const encoded = codec.encode(message);
    const bytes = 'finish' in encoded ? encoded.finish() : encoded;
    return Buffer.isBuffer(bytes) ? bytes : Buffer.from(bytes);
}
exports.__tsfTypeAliases = _a.decodeCompactMetadataV1("[1,{\"BaseMessage\":{\"kind\":18,\"typeName\":\"BaseMessage\",\"types\":[{\"kind\":20,\"name\":\"requestId\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"reply\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"error\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"userError\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"trace\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"traceId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"spanId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"traceFlags\",\"type\":{\"kind\":7},\"optional\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"pingPong\",\"type\":{\"kind\":12,\"types\":[{\"kind\":17},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"byteStreamOperation\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"streamId\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"write\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"chunk\",\"type\":{\"kind\":16,\"typeName\":\"Uint8Array\",\"classType\":{\"$tsf\":0}},\"optional\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"finish\",\"type\":{\"kind\":12,\"types\":[{\"kind\":17},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"destroy\",\"type\":{\"kind\":12,\"types\":[{\"kind\":18,\"types\":[{\"kind\":20,\"name\":\"error\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]},{\"kind\":4}]},\"optional\":true}]},\"IQueuedRequest\":{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]},\"ISrpcLogger\":{\"kind\":18,\"typeName\":\"ISrpcLogger\",\"types\":[]},\"ISrpcMessageHandler\":{\"kind\":18,\"typeName\":\"ISrpcMessageHandler\",\"types\":[{\"kind\":20,\"name\":\"handle\",\"type\":{\"kind\":2,\"typeName\":\"SrpcMessageHandlerFn\",\"typeArguments\":[{\"kind\":2,\"typeName\":\"C\"},{\"kind\":2,\"typeName\":\"I\"},{\"kind\":2,\"typeName\":\"O\"}]},\"optional\":false}],\"typeParameters\":[\"C\",\"I\",\"O\"]},\"ISrpcServerOptions\":{\"kind\":18,\"typeName\":\"ISrpcServerOptions\",\"types\":[{\"kind\":20,\"name\":\"logger\",\"type\":{\"kind\":18,\"typeName\":\"ISrpcLogger\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"clientMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"serverMessage\",\"type\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[]},\"optional\":false},{\"kind\":20,\"name\":\"wsPath\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"defaultUnspecifiedProtocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"debug\",\"type\":{\"kind\":12,\"types\":[{\"kind\":8},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"logLevel\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"info\"},{\"kind\":10,\"literal\":\"debug\"},{\"kind\":10,\"literal\":false}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"httpServer\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"Server\",\"classType\":{\"$tsfImport\":[1,\"node:http\",\"Server\"]}},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"lateReplyTombstoneTtlMs\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxInFlightClientRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxBufferedBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxMessageBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequests\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingServerRequestBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxPendingHandshakes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxActiveStreams\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientIdBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxClientMetadataBytes\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"maxAuthReplayPrincipals\",\"type\":{\"kind\":12,\"types\":[{\"kind\":7},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"authAudience\",\"type\":{\"kind\":12,\"types\":[{\"kind\":6},{\"kind\":4}]},\"optional\":true}],\"typeParameters\":[\"TClientOutput\",\"TServerOutput\"]},\"SrpcConnection\":{\"kind\":18,\"typeName\":\"SrpcConnection\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"readonly id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"readonly meta\",\"type\":{\"kind\":2,\"typeName\":\"T\"},\"optional\":false},{\"kind\":20,\"name\":\"readonly connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"readonly connected\",\"type\":{\"kind\":8},\"optional\":false}],\"typeParameters\":[\"T\"]},\"SrpcDisconnectCause\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":\"disconnect\"},{\"kind\":10,\"literal\":\"conflict\"},{\"kind\":10,\"literal\":\"supersede\"},{\"kind\":10,\"literal\":\"timeout\"},{\"kind\":10,\"literal\":\"badArg\"}],\"typeName\":\"SrpcDisconnectCause\"},\"SrpcMessageFns\":{\"kind\":18,\"typeName\":\"SrpcMessageFns\",\"types\":[],\"typeParameters\":[\"T\"]},\"SrpcMeta\":{\"kind\":17,\"typeName\":\"SrpcMeta\"},\"SrpcStream\":{\"kind\":18,\"typeName\":\"SrpcStream\",\"types\":[{\"kind\":20,\"name\":\"byteStream\",\"type\":{\"kind\":18,\"typeName\":\"IByteStream\",\"types\":[{\"kind\":20,\"name\":\"parentStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"remoteSenderIdParity\",\"type\":{\"kind\":12,\"types\":[{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":0},{\"kind\":10,\"literal\":1}]},{\"kind\":4}]},\"optional\":true}]},\"optional\":false},{\"kind\":20,\"name\":\"$ws\",\"type\":{\"kind\":16,\"typeName\":\"WebSocket\",\"classType\":{\"$tsf\":2}},\"optional\":false},{\"kind\":20,\"name\":\"$queue\",\"type\":{\"kind\":16,\"typeName\":\"Map\",\"classType\":{\"$tsf\":3},\"typeArguments\":[{\"kind\":6},{\"kind\":18,\"typeName\":\"IQueuedRequest\",\"types\":[{\"kind\":20,\"name\":\"exp\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"resolve\",\"type\":{\"kind\":2,\"typeName\":\"(value: unknown) =\\u003e void\"},\"optional\":false},{\"kind\":20,\"name\":\"reject\",\"type\":{\"kind\":2,\"typeName\":\"(err: unknown) =\\u003e void\"},\"optional\":false}]}]},\"optional\":false},{\"kind\":20,\"name\":\"id\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientStreamId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"address\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"clientId\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"appVersion\",\"type\":{\"kind\":6},\"optional\":false},{\"kind\":20,\"name\":\"configureTs\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"protocolVersion\",\"type\":{\"kind\":12,\"types\":[{\"kind\":10,\"literal\":1},{\"kind\":10,\"literal\":2}]},\"optional\":false},{\"kind\":20,\"name\":\"features\",\"type\":{\"kind\":12,\"types\":[{\"kind\":16,\"typeName\":\"ReadonlySet\",\"classType\":{\"$tsf\":4},\"typeArguments\":[{\"kind\":6}]},{\"kind\":4}]},\"optional\":true},{\"kind\":20,\"name\":\"supersede\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"meta\",\"type\":{\"kind\":2,\"typeName\":\"T\"},\"optional\":false},{\"kind\":20,\"name\":\"connectedAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"isActivated\",\"type\":{\"kind\":8},\"optional\":false},{\"kind\":20,\"name\":\"lastPingAt\",\"type\":{\"kind\":7},\"optional\":false},{\"kind\":20,\"name\":\"connected\",\"type\":{\"kind\":8},\"optional\":false}],\"typeParameters\":[\"T\"]}}]", [() => (typeof Uint8Array !== "undefined" ? Uint8Array : (typeof exports !== "undefined" ? exports.Uint8Array : undefined)), require, () => (typeof WebSocket !== "undefined" ? WebSocket : (typeof exports !== "undefined" ? exports.WebSocket : undefined)), () => (typeof Map !== "undefined" ? Map : (typeof exports !== "undefined" ? exports.Map : undefined)), () => (typeof ReadonlySet !== "undefined" ? ReadonlySet : (typeof exports !== "undefined" ? exports.ReadonlySet : undefined))], __tsf_metadata_type);
//# sourceMappingURL=types.js.map