I try to get a Remote Config value into a firebase function.
How can I achive this ?
------------------------ improved question after first hint from Doug ------------------------
There is a admin.remoteConfig().getTemplate()
method available.
Below is a semi-working example.
In the code below, I see that defaultVal is of type RemoteConfigParameterValue?. But how do I convert it to a number in typescript ??
const remoteConfigTemplate = await admin.remoteConfig().getTemplate();
const defaultVal = remoteConfigTemplate.parameters["video_max_duration"].defaultValue
const videoMaxDurationDefaultValue: number = Number(defaultVal); // XXXXXX does not work XXXXXXXX