11import { Forwarder , type FwFace , FwPacket } from "@ndn/fw" ;
22import { Data , Interest , Name , type NameLike , Signer } from "@ndn/packet" ;
33import { flatTransform } from "streaming-iterables" ;
4+ import type { Promisable } from "type-fest" ;
45
56import { type CommonOptions , exactOptions } from "./common" ;
67import type { DataBuffer } from "./data-buffer" ;
@@ -19,7 +20,7 @@ import type { DataBuffer } from "./data-buffer";
1920 * - {@link ProducerOptions.dataBuffer} is unset: cause a timeout.
2021 * - {@link ProducerOptions.dataBuffer} is provided: query the DataBuffer.
2122 */
22- export type ProducerHandler = ( interest : Interest , producer : Producer ) => Promise < Data | undefined > ;
23+ export type ProducerHandler = ( interest : Interest , producer : Producer ) => Promisable < Data | undefined > ;
2324
2425/** {@link produce } options. */
2526export interface ProducerOptions extends CommonOptions {
@@ -29,7 +30,7 @@ export interface ProducerOptions extends CommonOptions {
2930 * @defaultValue `true`
3031 *
3132 * @remarks
32- * If all nexthops of a FIB entry are set to non-capture, FIB lookup may continue onto nexthops
33+ * If all next-hops of a FIB entry are set to non-capture, FIB lookup may continue onto next-hops
3334 * on FIB entries with shorter prefixes. One use case is in dataset synchronization protocols,
3435 * where both local and remote sync participants want to receive each other's Interests.
3536 */
0 commit comments