中山大学
exports['foo-bar'] = {} // -> OK
Run Code Online (Sandbox Code Playgroud)
环境管理署
exports['foo-bar'] = {}; // -> NG
export['foo-bar'] = {}; // -> NG
export { 'foo-bar': {} }; // -> NG
export { fooBar as foo-bar }; // -> NG
export { fooBar as 'foo-bar' }; // -> NG
Run Code Online (Sandbox Code Playgroud)
通常我不会这样做,所以这不是问题,但我遇到了麻烦,因为Firebase Functions v2 只允许名称中包含小写字母、数字和连字符,并要求我将其导出。
javascript node.js firebase typescript google-cloud-functions