Skip to content

Instantly share code, notes, and snippets.

@drager
Last active September 24, 2017 13:00
Show Gist options
  • Save drager/0c8ee4b564460ed212e15ec3f92c9f57 to your computer and use it in GitHub Desktop.
Save drager/0c8ee4b564460ed212e15ec3f92c9f57 to your computer and use it in GitHub Desktop.
port module Ports exposing (..)
import Json.Encode
type alias Key =
String
type alias Value =
Json.Encode.Value
port localStorageGetItemResponse : (( Key, Value ) -> msg) -> Sub msg
port setItemInLocalStorage : ( Key, Value ) -> Cmd msg
port removeItemInLocalStorage : Key -> Cmd msg
port getItemInLocalStorage : Key -> Cmd msg
port clearLocalStorage : () -> Cmd msg
port setItemInSessionStorage : ( Key, Value ) -> Cmd msg
port removeItemInSessionStorage : Key -> Cmd msg
port getItemInSessionStorage : Key -> Cmd msg
port clearSessionStorage : () -> Cmd msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment