Module
Sketch.Settings
- Package
- purescript-sketch
- Repository
- iarthstar/purescript-sketch
#globalSettingForKey Source
globalSettingForKey :: forall a. Decode a => String -> Effect (Either (NonEmptyList ForeignError) a)
Gets the value of a Sketch setting for a given key.
#setGlobalSettingForKey Source
setGlobalSettingForKey :: forall a. Encode a => String -> a -> Effect Unit
Stores a value of a Sketch setting for a given key.
#settingForKey Source
settingForKey :: forall a. Decode a => String -> Effect (Either (NonEmptyList ForeignError) a)
Gets the value of a setting scoped to your plugin for a given key.
#setSettingForKey Source
setSettingForKey :: forall a. Encode a => String -> a -> Effect Unit
Stores a value of a setting scoped to your plugin for a given key.
#sessionVariable Source
sessionVariable :: forall a. Decode a => String -> Effect (Either (NonEmptyList ForeignError) a)
Gets the value of a variable which is persisted when the plugin finishes to run but is not persisted when Sketch closes. It is useful when you want to keep a value between plugin’s runs.