Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
import type { ChannelDirectoryAdapter } from "./types.adapters.js";
export const nullChannelDirectorySelf: NonNullable<ChannelDirectoryAdapter["self"]> = async () =>
null;
export const emptyChannelDirectoryList: NonNullable<
ChannelDirectoryAdapter["listPeers"]
> = async () => [];
/** Build a channel directory adapter with a null self resolver by default. */
export function createChannelDirectoryAdapter(
params: Omit<ChannelDirectoryAdapter, "self"> & {
self?: ChannelDirectoryAdapter["self"];
} = {},
): ChannelDirectoryAdapter {
return {
self: params.self ?? nullChannelDirectorySelf,
...params,
};
}
/** Build the common empty directory surface for channels without directory support. */
export function createEmptyChannelDirectoryAdapter(): ChannelDirectoryAdapter {
return createChannelDirectoryAdapter({
listPeers: emptyChannelDirectoryList,
listGroups: emptyChannelDirectoryList,
});
}
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland