From 0ce68f27708dfd45694bdb3642b01162a84131c2 Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Mon, 15 Jan 2024 18:14:02 +0200 Subject: [PATCH] fix typescript for net.peers() --- README.md | 3 ++- lib/infos.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 72e1e40..388c0a1 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ We're not on npm yet. In your package.json, include this as - [x] stage - [x] stats.json - [x] interpool glue -- [ ] writing hubs to stats.json +- [x] writing peers to stats.json +- [ ] ONLY writing hubs to stats.json - [ ] firewall - [ ] scheduler diff --git a/lib/infos.js b/lib/infos.js index 3c5e2ee..78c2c59 100644 --- a/lib/infos.js +++ b/lib/infos.js @@ -117,6 +117,9 @@ class Infos { return this.#map.entries() } + /** + * @returns {pull.Source<[Address, Info]>} + */ liveEntries() { return pullConcat([ pull.values([Array.from(this.#map.entries())]),