UNPKG

1e14-mux

Version:

Multiplexing for 1e14

21 lines (20 loc) 541 B
import { Node } from "1e14"; import { Muxed } from "../types"; export declare type In<T> = T; export declare type Out<T> = { /** * Multiplexed input value. */ d_mux: Muxed<T>; }; /** * Multiplexes input value. * Forwards multiplexed input value to a single output port. * @link https://github.com/1e14/1e14/wiki/Muxer */ export declare type Muxer<T> = Node<In<T>, Out<T>>; /** * Creates a Muxer node. * @param fields List of input fields. */ export declare function createMuxer<T>(fields: Array<keyof T>): Muxer<T>;