How to use @swim/streamlet - 1 common examples

To help you get started, we’ve selected a few @swim/streamlet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github swimos / swim / swim-system-js / swim-mesh-js / @swim / client / main / downlink / DownlinkStreamlet.ts View on Github external
@Inout
  hostUri: Inoutlet = this.inoutlet();

  @Inout
  nodeUri: Inoutlet = this.inoutlet();

  @Inout
  laneUri: Inoutlet = this.inoutlet();

  @Inout
  prio: Inoutlet = this.inoutlet();

  @Inout
  rate: Inoutlet = this.inoutlet();

  @Inout("body")
  bodyValue: Inoutlet = this.inoutlet();

  @Inout
  type: Inoutlet = this.inoutlet();

  @Out
  state: Outlet>;

  getOutput(outlet: Outlet | string): Value | undefined {
    outlet = this.outlet(outlet)!;
    if (outlet === this.state) {
      if (this.downlink instanceof ValueDownlink) {
        return this.downlink.get();
      } else if (this.downlinkRecord) {
        return this.downlinkRecord;
      }

@swim/streamlet

Stateful, streaming component model for application componets that continuously consume input state from streaming inlets, and continuously produce output state on streaming outlets

Apache-2.0
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular @swim/streamlet functions

Similar packages