From 95deb6a33114f8f2d975d01c252e50386d9afe07 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Wed, 27 Jul 2022 16:02:57 +1000 Subject: [PATCH] fix: ensure types are available in doc --- src/index.ts | 5 +++++ src/lib/wait_for_remote_peer.ts | 2 +- src/lib/waku_filter/index.ts | 7 ++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index ed489e623b..58d36d02a7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,12 +15,17 @@ export * as utils from "./lib/utils"; export { waitForRemotePeer } from "./lib/wait_for_remote_peer"; +export * as proto_message from "./proto/message"; + export * as waku from "./lib/waku"; export { createWaku, Waku, Protocols } from "./lib/waku"; export * as waku_message from "./lib/waku_message"; export { WakuMessage } from "./lib/waku_message"; +export * as waku_filter from "./lib/waku_filter"; +export { WakuFilter } from "./lib/waku_filter"; + export * as waku_light_push from "./lib/waku_light_push"; export { WakuLightPush, diff --git a/src/lib/wait_for_remote_peer.ts b/src/lib/wait_for_remote_peer.ts index 634eac8401..87cd439d96 100644 --- a/src/lib/wait_for_remote_peer.ts +++ b/src/lib/wait_for_remote_peer.ts @@ -22,7 +22,7 @@ interface WakuGossipSubProtocol extends GossipSub { /** * Wait for a remote peer to be ready given the passed protocols. - * Useful when using the [[CreateOptions.bootstrap]] with [[Waku.create]]. + * Useful when using the [[CreateOptions.bootstrap]] with [[createWaku]]. * * If the passed protocols is a GossipSub protocol, then it resolves only once * a peer is in a mesh, to help ensure that other peers will send and receive diff --git a/src/lib/waku_filter/index.ts b/src/lib/waku_filter/index.ts index 8150733c2a..122ae7f511 100644 --- a/src/lib/waku_filter/index.ts +++ b/src/lib/waku_filter/index.ts @@ -15,6 +15,7 @@ import { hexToBytes } from "../utils"; import { DecryptionMethod, WakuMessage } from "../waku_message"; import { ContentFilter, FilterRPC } from "./filter_rpc"; +export { ContentFilter }; export const FilterCodec = "/vac/waku/filter/2.0.0-beta1"; @@ -32,7 +33,7 @@ export interface CreateOptions { pubSubTopic?: string; } -type FilterSubscriptionOpts = { +export type FilterSubscriptionOpts = { /** * The Pubsub topic for the subscription */ @@ -43,9 +44,9 @@ type FilterSubscriptionOpts = { peerId?: PeerId; }; -type FilterCallback = (msg: WakuMessage) => void | Promise; +export type FilterCallback = (msg: WakuMessage) => void | Promise; -type UnsubscribeFunction = () => Promise; +export type UnsubscribeFunction = () => Promise; /** * Implements client side of the [Waku v2 Filter protocol](https://rfc.vac.dev/spec/12/).