import { PubSub } from '@google-cloud/pubsub' import { TypedCaller, TypedTopic } from '../..' import { authedApp } from './_app' import { emulatorOrigin, projectId } from './_config' const app = authedApp('user') const functionsApp = app.functions('asia-northeast1') functionsApp.useFunctionsEmulator(emulatorOrigin.functions) type FunctionsModule = typeof import('./functions-server') export const typedCaller = new TypedCaller(functionsApp) export const typedTopic = new TypedTopic( new PubSub({ apiEndpoint: emulatorOrigin.pubsub, projectId }), )