Interface ProtocolModuleHandle<TAdapter, TProtocol>

One discovered, disposable protocol-module handle bound to a source descriptor. adapter is the same typed escape-hatch value historically returned by Source.protocol(name) (for example a HonuaPmtilesArchive), so migrating a built-in onto this seam never changes what callers observe through the existing escape hatch.

TProtocol mirrors the descriptor kind a ProtocolModule<TKind> accepts (built-in Protocol by default, or TKind | Protocol when parameterized by discover() below) so a handle for a custom-kind descriptor carries that kind through rather than widening to string.

interface ProtocolModuleHandle<TAdapter, TProtocol> {
    adapter: TAdapter;
    capabilities: Capabilities;
    descriptor: SourceDescriptor<TProtocol>;
    diagnostics: readonly ProtocolModuleDiagnostic[];
    dispose(): void | Promise<void>;
}

Type Parameters

  • TAdapter = unknown
  • TProtocol extends string = Protocol

Properties

adapter: TAdapter
capabilities: Capabilities
diagnostics: readonly ProtocolModuleDiagnostic[]

Methods