UNPKG

@elbwalker/stack-firebase

Version:

Firebase stack for walkerOS

31 lines (26 loc) 1.07 kB
import { NodeClient } from '@elbwalker/client-node'; import { HttpsOptions, HttpsFunction } from 'firebase-functions/v2/https'; interface Instance { config: Config; instance: NodeClient.Instance; elb: NodeClient.Elb; push: Push; } type PartialConfig = Partial<Config>; interface Config { client: NodeClient.InitConfig; } interface Push { (options?: HttpsOptions): HttpsFunction; } type PrependInstance<Fn extends (...args: never) => never> = (instance: Instance, ...args: Parameters<Fn>) => ReturnType<Fn>; type stack_Config = Config; type stack_Instance = Instance; type stack_PartialConfig = PartialConfig; type stack_PrependInstance<Fn extends (...args: never) => never> = PrependInstance<Fn>; type stack_Push = Push; declare namespace stack { export type { stack_Config as Config, stack_Instance as Instance, stack_PartialConfig as PartialConfig, stack_PrependInstance as PrependInstance, stack_Push as Push }; } declare function firebaseStack(customConfig?: PartialConfig): Instance; export { stack as FirebaseStack, firebaseStack };