← all modules

Std.Sub

Std.Sub
  Std.Sub — TEA-side inbound subscriptions (Layer 3 Sky source).

Types
  type ConnectionState = Online | Reconnecting | Offline { pending : Int }

Values
  batch : List (Sub msg) -> Sub msg
      `batch subs` — combine multiple subscriptions into one. Composes
  connection : (ConnectionState -> msg) -> Sub msg
      `connection toMsg` — receive the client's `ConnectionState` on every
  every : Int -> msg -> Sub msg
      `every intervalMillis msg` — dispatch `msg` every
  everyWithTime : Int -> (Int -> msg) -> Sub msg
      `everyWithTime intervalMillis toMsg` — like `every`, but each tick's Msg
  none : Sub msg
  onFragment : (String -> msg) -> Sub msg
      `onFragment toMsg` — receive the URL fragment (the text after `#`, as
  subscribeTopic : String -> (any -> msg) -> Sub msg
      `subscribeTopic topic toMsg` — receive pub/sub broadcasts on