Firebase Functions は index.js で exports.func_name = ... といった感じで export した関数が Firebase にデプロイされる。 例えばデプロイ時に DB から読み込んだ設定に応じて関数をセットアップしたい場合を考える。以下のように書けばいい。 // index.ts interface CloudFunction { functionName: string; someParameter: string; } module.exports = (() => { const functions: CloudFunction[] = await getFunctions(); return functions.reduce( (array, f) => ({ ...array, [f.functionName]: doSometh