@windy/store
Represents a key-value store with methods for getting, setting, and observing values. The store maintains the integrity of the parameters and checks the validity of the input.
Used store keys are defined as DataSpecifications
interface.
Check out complete list of store properties.
Used for storing major parameters and user settings.
It also supports observing changes to the values and retrieving allowed values for each key.
Use methods get
to read value from store, set
to change value in the store and on
to observe change of the value. Some of the items respond to method getAllowed
to return array of allowed values.
Method set
returns true
if provided value was valid and was actually changed.
Store is instance of class Evented.
Example
var overlay = store.get('overlay');
// 'wind' ... actually used overlay
var allowedOverlays = store.getAllowed('overlay');
// ['wind', 'rain', ... ] ... list of allowed values
store.set('overlay', 'rain');
// true ... Overlay was changed to rain
store.on('overlay', ovr => {
// Called when value was changed
});
Table of contents
Variables
Functions
Variables
default
• Const
default: Store
Functions
get
▸ get<T
, Item
>(name
, options?
): Item
["def"
]
Retrieves value stored in store
Type parameters
Name | Type |
---|---|
T | extends keyof DataSpecifications |
Item | extends DataSpecificationsObject <ColorGradient > | DataSpecificationsObject <MetricItem > | DataSpecificationsObject <"ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" > | DataSpecificationsObject <"surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" > | DataSpecificationsObject <"next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" > | DataSpecificationsObject <number > | DataSpecificationsObject <string > | DataSpecificationsObject <Isolines > | DataSpecificationsObject <"drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" > | DataSpecificationsObject <("drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <("next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" )[]> | DataSpecificationsObject <"gfs" | "ecmwf" | "icon" | "iconEu" > | DataSpecificationsObject <boolean > | DataSpecificationsObject <Calendar > | DataSpecificationsObject <("surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" )[]> | DataSpecificationsObject <"off" | "on" | "intensive" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" | "auto" > | DataSpecificationsObject <"12h" | "24h" > | DataSpecificationsObject <"sznmap" | "sat" | "winter" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" > | DataSpecificationsObject <CustomParticles > | DataSpecificationsObject <"gps" | "ip" | "last" | "location" > | DataSpecificationsObject <MapCoordinates > | DataSpecificationsObject <HomeLocation > | DataSpecificationsObject <1 | 3 > | DataSpecificationsObject <GeolocationInfo > | DataSpecificationsObject <ReverseResult > | DataSpecificationsObject <Record <string , number >> | DataSpecificationsObject <LatLon & { name? : string }> | DataSpecificationsObject <"all" | "today" | "tomm" | "later" > | DataSpecificationsObject <"archive" | "long" | "medium" | "short" > | DataSpecificationsObject <"medium" | "slow" | "fast" > | DataSpecificationsObject <RadarCalendar > | DataSpecificationsObject <SatelliteCalendar > | DataSpecificationsObject <"BLUE" | "VISIR" | "IRBT" | "DBG" > | DataSpecificationsObject <Pois > | DataSpecificationsObject <Pois []> | DataSpecificationsObject <Donation []> | DataSpecificationsObject <"profi" | "distance" > | DataSpecificationsObject <"gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | "noModel" > | DataSpecificationsObject <"premium" > | DataSpecificationsObject <SubscriptionInfo > | DataSpecificationsObject <NotificationPreferences > | DataSpecificationsObject <User > | DataSpecificationsObject <LatLon & { type? : string }> | DataSpecificationsObject <LatLon > | DataSpecificationsObject <"radar-widget" > | DataSpecificationsObject <"horizontal" | "vertical" | "north" > | DataSpecificationsObject <RouteMotionSpeed > | DataSpecificationsObject <ShowableError []> | DataSpecificationsObject <string []> | DataSpecificationsObject <("ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" )[]> | DataSpecificationsObject <MenuItems > | DataSpecificationsObject <PickerMobileTimeout > | DataSpecificationsObject <OfflineConfiguration > | DataSpecificationsObject <DownloadedInfo > | DataSpecificationsObject <("gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <Consent > | DataSpecificationsObject <Omit <Consent , "analytics" >> | DataSpecificationsObject <InstalledExternalPluginConfig []> |
Parameters
Name | Type | Description |
---|---|---|
name | T | Name |
options? | Object | - |
options.forceGet | boolean | Skip cache and return even nullish value with no default polyfill |
Returns
Item
["def"
]
stored value
getAll
▸ getAll(): void
Outputs all allowed properties for give key into console.log
Returns
void
getAllowed
▸ getAllowed<T
, Item
>(name
): string
| Item
["allowed"
]
Return list of permitted values for given key
Type parameters
Name | Type |
---|---|
T | extends keyof DataSpecifications |
Item | extends DataSpecificationsObject <ColorGradient > | DataSpecificationsObject <MetricItem > | DataSpecificationsObject <"ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" > | DataSpecificationsObject <"surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" > | DataSpecificationsObject <"next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" > | DataSpecificationsObject <number > | DataSpecificationsObject <string > | DataSpecificationsObject <Isolines > | DataSpecificationsObject <"drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" > | DataSpecificationsObject <("drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <("next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" )[]> | DataSpecificationsObject <"gfs" | "ecmwf" | "icon" | "iconEu" > | DataSpecificationsObject <boolean > | DataSpecificationsObject <Calendar > | DataSpecificationsObject <("surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" )[]> | DataSpecificationsObject <"off" | "on" | "intensive" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" | "auto" > | DataSpecificationsObject <"12h" | "24h" > | DataSpecificationsObject <"sznmap" | "sat" | "winter" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" > | DataSpecificationsObject <CustomParticles > | DataSpecificationsObject <"gps" | "ip" | "last" | "location" > | DataSpecificationsObject <MapCoordinates > | DataSpecificationsObject <HomeLocation > | DataSpecificationsObject <1 | 3 > | DataSpecificationsObject <GeolocationInfo > | DataSpecificationsObject <ReverseResult > | DataSpecificationsObject <Record <string , number >> | DataSpecificationsObject <LatLon & { name? : string }> | DataSpecificationsObject <"all" | "today" | "tomm" | "later" > | DataSpecificationsObject <"archive" | "long" | "medium" | "short" > | DataSpecificationsObject <"medium" | "slow" | "fast" > | DataSpecificationsObject <RadarCalendar > | DataSpecificationsObject <SatelliteCalendar > | DataSpecificationsObject <"BLUE" | "VISIR" | "IRBT" | "DBG" > | DataSpecificationsObject <Pois > | DataSpecificationsObject <Pois []> | DataSpecificationsObject <Donation []> | DataSpecificationsObject <"profi" | "distance" > | DataSpecificationsObject <"gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | "noModel" > | DataSpecificationsObject <"premium" > | DataSpecificationsObject <SubscriptionInfo > | DataSpecificationsObject <NotificationPreferences > | DataSpecificationsObject <User > | DataSpecificationsObject <LatLon & { type? : string }> | DataSpecificationsObject <LatLon > | DataSpecificationsObject <"radar-widget" > | DataSpecificationsObject <"horizontal" | "vertical" | "north" > | DataSpecificationsObject <RouteMotionSpeed > | DataSpecificationsObject <ShowableError []> | DataSpecificationsObject <string []> | DataSpecificationsObject <("ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" )[]> | DataSpecificationsObject <MenuItems > | DataSpecificationsObject <PickerMobileTimeout > | DataSpecificationsObject <OfflineConfiguration > | DataSpecificationsObject <DownloadedInfo > | DataSpecificationsObject <("gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <Consent > | DataSpecificationsObject <Omit <Consent , "analytics" >> | DataSpecificationsObject <InstalledExternalPluginConfig []> |
Parameters
Name | Type | Description |
---|---|---|
name | T | Name |
Returns
string
| Item
["allowed"
]
List of allowed values for the name; or string with info it is checked by function
getDefault
▸ getDefault<T
, Item
>(name
): Item
["def"
]
Returns default value for given key
Type parameters
Name | Type |
---|---|
T | extends keyof DataSpecifications |
Item | extends DataSpecificationsObject <ColorGradient > | DataSpecificationsObject <MetricItem > | DataSpecificationsObject <"ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" > | DataSpecificationsObject <"surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" > | DataSpecificationsObject <"next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" > | DataSpecificationsObject <number > | DataSpecificationsObject <string > | DataSpecificationsObject <Isolines > | DataSpecificationsObject <"drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" > | DataSpecificationsObject <("drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <("next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" )[]> | DataSpecificationsObject <"gfs" | "ecmwf" | "icon" | "iconEu" > | DataSpecificationsObject <boolean > | DataSpecificationsObject <Calendar > | DataSpecificationsObject <("surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" )[]> | DataSpecificationsObject <"off" | "on" | "intensive" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" | "auto" > | DataSpecificationsObject <"12h" | "24h" > | DataSpecificationsObject <"sznmap" | "sat" | "winter" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" > | DataSpecificationsObject <CustomParticles > | DataSpecificationsObject <"gps" | "ip" | "last" | "location" > | DataSpecificationsObject <MapCoordinates > | DataSpecificationsObject <HomeLocation > | DataSpecificationsObject <1 | 3 > | DataSpecificationsObject <GeolocationInfo > | DataSpecificationsObject <ReverseResult > | DataSpecificationsObject <Record <string , number >> | DataSpecificationsObject <LatLon & { name? : string }> | DataSpecificationsObject <"all" | "today" | "tomm" | "later" > | DataSpecificationsObject <"archive" | "long" | "medium" | "short" > | DataSpecificationsObject <"medium" | "slow" | "fast" > | DataSpecificationsObject <RadarCalendar > | DataSpecificationsObject <SatelliteCalendar > | DataSpecificationsObject <"BLUE" | "VISIR" | "IRBT" | "DBG" > | DataSpecificationsObject <Pois > | DataSpecificationsObject <Pois []> | DataSpecificationsObject <Donation []> | DataSpecificationsObject <"profi" | "distance" > | DataSpecificationsObject <"gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | "noModel" > | DataSpecificationsObject <"premium" > | DataSpecificationsObject <SubscriptionInfo > | DataSpecificationsObject <NotificationPreferences > | DataSpecificationsObject <User > | DataSpecificationsObject <LatLon & { type? : string }> | DataSpecificationsObject <LatLon > | DataSpecificationsObject <"radar-widget" > | DataSpecificationsObject <"horizontal" | "vertical" | "north" > | DataSpecificationsObject <RouteMotionSpeed > | DataSpecificationsObject <ShowableError []> | DataSpecificationsObject <string []> | DataSpecificationsObject <("ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" )[]> | DataSpecificationsObject <MenuItems > | DataSpecificationsObject <PickerMobileTimeout > | DataSpecificationsObject <OfflineConfiguration > | DataSpecificationsObject <DownloadedInfo > | DataSpecificationsObject <("gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <Consent > | DataSpecificationsObject <Omit <Consent , "analytics" >> | DataSpecificationsObject <InstalledExternalPluginConfig []> |
Parameters
Name | Type | Description |
---|---|---|
name | T | Name |
Returns
Item
["def"
]
Data specification type
off
▸ off(id
): void
Parameters
Name | Type |
---|---|
id | number |
Returns
void
▸ off<K
, Q
>(topic
, callback
, context?
): void
Type parameters
Name | Type |
---|---|
K | extends keyof StoreTypes |
Q | extends [] | [string , string ] | [ColorGradient , string ] | [MetricItem , string ] | [boolean , string ] | [number , string ] | ["ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" , string ] | ["surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" , string ] | ["next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" , string ] | [Isolines , string ] | ["drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" , string ] | [("drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[], string ] | [("next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" )[], string ] | ["gfs" | "ecmwf" | "icon" | "iconEu" , string ] | [Calendar , string ] | [("surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" )[], string ] | ["off" | "on" | "intensive" , string ] | ["en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" | "auto" , string ] | ["12h" | "24h" , string ] | ["sznmap" | "sat" | "winter" , string ] | ["en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" , string ] | [CustomParticles , string ] | ["gps" | "ip" | "last" | "location" , string ] | [MapCoordinates , string ] | [HomeLocation , string ] | [1 | 3 , string ] | [GeolocationInfo , string ] | [ReverseResult , string ] | [Record <string , number >, string ] | [LatLon & { name? : string }, string ] | ["all" | "today" | "tomm" | "later" , string ] | ["archive" | "long" | "medium" | "short" , string ] | ["medium" | "slow" | "fast" , string ] | [RadarCalendar , string ] | [SatelliteCalendar , string ] | ["BLUE" | "VISIR" | "IRBT" | "DBG" , string ] | [Pois , string ] | [Pois [], string ] | [Donation [], string ] | ["profi" | "distance" , string ] | ["gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | "noModel" , string ] | ["premium" , string ] | [SubscriptionInfo , string ] | [NotificationPreferences , string ] | [User , string ] | [LatLon & { type? : string }, string ] | [LatLon , string ] | ["radar-widget" , string ] | ["horizontal" | "vertical" | "north" , string ] | [RouteMotionSpeed , string ] | [ShowableError [], string ] | [string [], string ] | [("ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" )[], string ] | [MenuItems , string ] | [PickerMobileTimeout , string ] | [OfflineConfiguration , string ] | [DownloadedInfo , string ] | [("gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[], string ] | [Consent , string ] | [Omit <Consent , "analytics" >, string ] | [InstalledExternalPluginConfig [], string ] | [string , unknown ] |
Parameters
Name | Type |
---|---|
topic | K |
callback | (...data : TrimUndefinedFromRight <Arrayify <Q >>) => void |
context? | ThisType <unknown > |
Returns
void
on
▸ on<K
, Q
>(topic
, callback
, context?
, once?
): number
Hooks a callback, that will be triggerd on specified message.
Type parameters
Name | Type |
---|---|
K | extends keyof StoreTypes |
Q | extends [] | [string , string ] | [ColorGradient , string ] | [MetricItem , string ] | [boolean , string ] | [number , string ] | ["ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" , string ] | ["surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" , string ] | ["next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" , string ] | [Isolines , string ] | ["drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" , string ] | [("drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[], string ] | [("next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" )[], string ] | ["gfs" | "ecmwf" | "icon" | "iconEu" , string ] | [Calendar , string ] | [("surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" )[], string ] | ["off" | "on" | "intensive" , string ] | ["en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" | "auto" , string ] | ["12h" | "24h" , string ] | ["sznmap" | "sat" | "winter" , string ] | ["en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" , string ] | [CustomParticles , string ] | ["gps" | "ip" | "last" | "location" , string ] | [MapCoordinates , string ] | [HomeLocation , string ] | [1 | 3 , string ] | [GeolocationInfo , string ] | [ReverseResult , string ] | [Record <string , number >, string ] | [LatLon & { name? : string }, string ] | ["all" | "today" | "tomm" | "later" , string ] | ["archive" | "long" | "medium" | "short" , string ] | ["medium" | "slow" | "fast" , string ] | [RadarCalendar , string ] | [SatelliteCalendar , string ] | ["BLUE" | "VISIR" | "IRBT" | "DBG" , string ] | [Pois , string ] | [Pois [], string ] | [Donation [], string ] | ["profi" | "distance" , string ] | ["gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | "noModel" , string ] | ["premium" , string ] | [SubscriptionInfo , string ] | [NotificationPreferences , string ] | [User , string ] | [LatLon & { type? : string }, string ] | [LatLon , string ] | ["radar-widget" , string ] | ["horizontal" | "vertical" | "north" , string ] | [RouteMotionSpeed , string ] | [ShowableError [], string ] | [string [], string ] | [("ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" )[], string ] | [MenuItems , string ] | [PickerMobileTimeout , string ] | [OfflineConfiguration , string ] | [DownloadedInfo , string ] | [("gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[], string ] | [Consent , string ] | [Omit <Consent , "analytics" >, string ] | [InstalledExternalPluginConfig [], string ] | [string , unknown ] |
Parameters
Name | Type | Description |
---|---|---|
topic | K | Topic to subscribe |
callback | (...data : TrimUndefinedFromRight <Arrayify <Q >>) => void | Callback called when topic is emitted |
context? | ThisType <unknown > | Optional context to change this binding |
once? | boolean | Optional if callback should be fired only once or at every time |
Returns
number
Unsubscribe id
once
▸ once<K
, Q
>(topic
, callback
, context?
): number
Hooks a callback, that will be triggerd just once on specified message.
Type parameters
Name | Type |
---|---|
K | extends keyof StoreTypes |
Q | extends [] | [string , string ] | [ColorGradient , string ] | [MetricItem , string ] | [boolean , string ] | [number , string ] | ["ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" , string ] | ["surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" , string ] | ["next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" , string ] | [Isolines , string ] | ["drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" , string ] | [("drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[], string ] | [("next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" )[], string ] | ["gfs" | "ecmwf" | "icon" | "iconEu" , string ] | [Calendar , string ] | [("surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" )[], string ] | ["off" | "on" | "intensive" , string ] | ["en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" | "auto" , string ] | ["12h" | "24h" , string ] | ["sznmap" | "sat" | "winter" , string ] | ["en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" , string ] | [CustomParticles , string ] | ["gps" | "ip" | "last" | "location" , string ] | [MapCoordinates , string ] | [HomeLocation , string ] | [1 | 3 , string ] | [GeolocationInfo , string ] | [ReverseResult , string ] | [Record <string , number >, string ] | [LatLon & { name? : string }, string ] | ["all" | "today" | "tomm" | "later" , string ] | ["archive" | "long" | "medium" | "short" , string ] | ["medium" | "slow" | "fast" , string ] | [RadarCalendar , string ] | [SatelliteCalendar , string ] | ["BLUE" | "VISIR" | "IRBT" | "DBG" , string ] | [Pois , string ] | [Pois [], string ] | [Donation [], string ] | ["profi" | "distance" , string ] | ["gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | "noModel" , string ] | ["premium" , string ] | [SubscriptionInfo , string ] | [NotificationPreferences , string ] | [User , string ] | [LatLon & { type? : string }, string ] | [LatLon , string ] | ["radar-widget" , string ] | ["horizontal" | "vertical" | "north" , string ] | [RouteMotionSpeed , string ] | [ShowableError [], string ] | [string [], string ] | [("ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" )[], string ] | [MenuItems , string ] | [PickerMobileTimeout , string ] | [OfflineConfiguration , string ] | [DownloadedInfo , string ] | [("gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[], string ] | [Consent , string ] | [Omit <Consent , "analytics" >, string ] | [InstalledExternalPluginConfig [], string ] | [string , unknown ] |
Parameters
Name | Type | Description |
---|---|---|
topic | K | Topic to subscribe |
callback | (...data : TrimUndefinedFromRight <Arrayify <Q >>) => void | Callback called when topic is emitted |
context? | ThisType <unknown > | Optional context to change this binding |
Returns
number
Unsubscribe id
set
▸ set<T
, Item
>(name
, value
, opts?
): SetReturnType
<T
>
Sets a value in key, value store. If succesfull,a nd value has been changed, store will brodcast message with name and value. Limitation:** Our store is quite primitive so it can not compare Arrays and Objects. Always create new one or use forceChange
* option.
Type parameters
Name | Type |
---|---|
T | extends keyof DataSpecifications |
Item | extends DataSpecificationsObject <ColorGradient > | DataSpecificationsObject <MetricItem > | DataSpecificationsObject <"ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" > | DataSpecificationsObject <"surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" > | DataSpecificationsObject <"next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" > | DataSpecificationsObject <number > | DataSpecificationsObject <string > | DataSpecificationsObject <Isolines > | DataSpecificationsObject <"drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" > | DataSpecificationsObject <("drought" | "radar" | "satellite" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "icon" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <("next12h" | "next24h" | "next36h" | "next2d" | "next48h" | "next60h" | "next3d" | "next5d" | "next10d" )[]> | DataSpecificationsObject <"gfs" | "ecmwf" | "icon" | "iconEu" > | DataSpecificationsObject <boolean > | DataSpecificationsObject <Calendar > | DataSpecificationsObject <("surface" | "100m" | "975h" | "950h" | "925h" | "900h" | "850h" | "800h" | "700h" | "600h" | "500h" | "400h" | "300h" | "250h" | "200h" | "150h" | "10h" )[]> | DataSpecificationsObject <"off" | "on" | "intensive" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" | "auto" > | DataSpecificationsObject <"12h" | "24h" > | DataSpecificationsObject <"sznmap" | "sat" | "winter" > | DataSpecificationsObject <"en" | "zh-TW" | "zh" | "ja" | "fr" | "ko" | "it" | "ru" | "nl" | "cs" | "tr" | "pl" | "sv" | "fi" | "ro" | "el" | "hu" | "hr" | "ca" | "da" | "ar" | "fa" | "hi" | "ta" | "sk" | "uk" | "bg" | "he" | "is" | "lt" | "et" | "vi" | "sl" | "sr" | "id" | "th" | "sq" | "pt" | "nb" | "es" | "de" | "bn" > | DataSpecificationsObject <CustomParticles > | DataSpecificationsObject <"gps" | "ip" | "last" | "location" > | DataSpecificationsObject <MapCoordinates > | DataSpecificationsObject <HomeLocation > | DataSpecificationsObject <1 | 3 > | DataSpecificationsObject <GeolocationInfo > | DataSpecificationsObject <ReverseResult > | DataSpecificationsObject <Record <string , number >> | DataSpecificationsObject <LatLon & { name? : string }> | DataSpecificationsObject <"all" | "today" | "tomm" | "later" > | DataSpecificationsObject <"archive" | "long" | "medium" | "short" > | DataSpecificationsObject <"medium" | "slow" | "fast" > | DataSpecificationsObject <RadarCalendar > | DataSpecificationsObject <SatelliteCalendar > | DataSpecificationsObject <"BLUE" | "VISIR" | "IRBT" | "DBG" > | DataSpecificationsObject <Pois > | DataSpecificationsObject <Pois []> | DataSpecificationsObject <Donation []> | DataSpecificationsObject <"profi" | "distance" > | DataSpecificationsObject <"gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" | "noModel" > | DataSpecificationsObject <"premium" > | DataSpecificationsObject <SubscriptionInfo > | DataSpecificationsObject <NotificationPreferences > | DataSpecificationsObject <User > | DataSpecificationsObject <LatLon & { type? : string }> | DataSpecificationsObject <LatLon > | DataSpecificationsObject <"radar-widget" > | DataSpecificationsObject <"horizontal" | "vertical" | "north" > | DataSpecificationsObject <RouteMotionSpeed > | DataSpecificationsObject <ShowableError []> | DataSpecificationsObject <string []> | DataSpecificationsObject <("ptype" | "fwi" | "uvindex" | "radar" | "satellite" | "wind" | "gust" | "gustAccu" | "turbulence" | "icing" | "rain" | "rainAccu" | "snowAccu" | "snowcover" | "thunder" | "temp" | "dewpoint" | "rh" | "deg0" | "wetbulbtemp" | "solarpower" | "clouds" | "hclouds" | "mclouds" | "lclouds" | "fog" | "cloudtop" | "cbase" | "visibility" | "cape" | "ccl" | "waves" | "swell1" | "swell2" | "swell3" | "wwaves" | "sst" | "currents" | "currentsTide" | "no2" | "pm2p5" | "aod550" | "gtco3" | "tcso2" | "go3" | "cosc" | "dustsm" | "pressure" | "efiTemp" | "efiWind" | "efiRain" | "capAlerts" | "soilMoisture40" | "soilMoisture100" | "moistureAnom40" | "moistureAnom100" | "drought40" | "drought100" | "dfm10h" )[]> | DataSpecificationsObject <MenuItems > | DataSpecificationsObject <PickerMobileTimeout > | DataSpecificationsObject <OfflineConfiguration > | DataSpecificationsObject <DownloadedInfo > | DataSpecificationsObject <("gfs" | "ecmwf" | "ecmwfAifs" | "icon" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue" )[]> | DataSpecificationsObject <Consent > | DataSpecificationsObject <Omit <Consent , "analytics" >> | DataSpecificationsObject <InstalledExternalPluginConfig []> |
Parameters
Name | Type | Description |
---|---|---|
name | T | Name |
value | Item ["def" ] | Value |
opts | StoreOptions | Options |
Returns
SetReturnType
<T
>
optional, returns true if value was changed, undefined if change failed, Promise obj if change was asynchronous