我正在将我的 firebase 功能升级到 v2。以前我的函数是使用驼峰命名法(例如 doCoolStuff)和蛇形命名法(例如 dope_api)命名的。但 v2 中都不支持这些。
https://firebase.google.com/docs/functions/beta#other_limitations
函数名称仅限于小写字母、数字和破折号
据我所知,指定函数名称的唯一方法是基于导出的名称(我使用的是打字稿),并且不支持带破折号的变量名称。
export const doCoolStuff = onRequest(...)
// or
export const dope_api = onRequest(...)
Run Code Online (Sandbox Code Playgroud)
那么如何创建一个名称包含破折号的函数,而不是我之前使用的空格呢?