Types for the LocalStorage module.
A convenience type for values in the store. Same as Json.Encode.Value.
The operation that caused your wrapper Msg to be sent.
For real ports, you'll only ever see GetItemOperation.
For simluated ports, you'll see the others as well, because you have to save the updated state.
Wrap up your ports.
You'll usually create one of these with LocalStorage.realRealPorts or DictPorts.make.
Your update Msg will receive one, if you're using simulated ports.
A Dict that stores key/value pairs for the simulated ports.
Your Msg, which wraps the key/value pair from a getItem return.
For real ports, you'll only care about the GetItem operation. You'll get Nothing for the Ports.
For simluated ports, you need to store the Ports in your Model.
The required signature of your localStorage.getItem port.
The required signature of your localStorage.setItem port.
The required signature of your localStorage.clear port.
The required signature of your subscription to receive getItem values.
Use this to turn the Value coming from a receive port into a Msg.
Dict.empty
A convenience type for keys in the store. Same as
String.